Hi there,
I am trying to read SAS dataset into R and have observed some weird behaviors.
Here is my setting. I copied retail.sas7bdat from sashelp and placed it in my
test directory C:\Temp.
In R, I submitted the following command
read.ssd(C:/Temp, retail, sascmd=C:/Program
I'm learning R and am converting some code from SPSS into R. My background
is in SAS/SPSS so the vectorization is new to me and I'm trying to learn
how to NOT use loops...or use them sparingly. I'm wondering what the
most efficient to tackle a problem I'm working on is. Below is an example
piece
Here's a direct translation:
Variable - 0
Variable - ifelse(item1 == 1, Variable +1, Variable)
Variable - ifelse(item2 == 1, Variable +1, Variable)
Variable - ifelse(item3 == 1, Variable +1, Variable)
Variable - ifelse(item4 == 1, Variable +1, Variable)
Here's another way to do it:
Variable
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of Jeremy Miles
Sent: Monday, February 25, 2013 5:41 PM
To: Craig J
Cc: r-help
Subject: Re: [R] Converting code to R Question
Here's a direct translation:
Variable - 0
Variable - ifelse
If you do this sort of thing a lot you may find the psych package helpful:
# make example data
x - 1:3
dat - data.frame(expand.grid(Item1=x, Item2=x, Item3=x, Item4=x))
# make scoring ky
key - c(Item1=1, Item2=2, Item3=1, Item4=1)
# load psych library
library(psych)
# score
(scores -
-one-step-forecasts/
Hope this helps.
Jean
On Wed, Feb 13, 2013 at 9:28 AM, Pedro Carvalho
pedro_n_pi...@hotmail.comwrote:
Hello,
I have submitted a R question to stackoverflow and have not received an
answer.
Could anyone help me out?
http://stackoverflow.com/questions/14825443
Hello,
I have submitted a R question to stackoverflow and have not received an answer.
Could anyone help me out?
http://stackoverflow.com/questions/14825443/backtesting-accuracy-of-regression-model-through-rolling-window-regression-with
Best regards,
Pedro
On Sat, Feb 9, 2013 at 11:43 AM, Uwe Ligges lig...@statistik.tu-dortmund.de
wrote:
On 08.02.2013 20:14, David Romano wrote:
Hi everyone,
I'm not exactly sure how to ask this question most clearly, but I hope
that
giving the context in which it occurs for me will help: I'm trying to
On 08.02.2013 20:14, David Romano wrote:
Hi everyone,
I'm not exactly sure how to ask this question most clearly, but I hope that
giving the context in which it occurs for me will help: I'm trying to
compare the brain images of two patient populations; each image is composed
of voxels (the
Hi everyone,
I'm not exactly sure how to ask this question most clearly, but I hope that
giving the context in which it occurs for me will help: I'm trying to
compare the brain images of two patient populations; each image is composed
of voxels (the 3D analogue of pixels), and I have two images
After applying the NLS for a model like y=exp(a*x), and I get
a result showing the summary as:
Estimate Std. Error t value Pr(|t|)
2.6720 1.4758 1.811 0.3212
My question is what this t-statistics tests? And what's the
meaning of Pr?
t is (estimate/std.err) and can be used to
Thanks, Ellison. Another question is if this p-value is a good parameter to
test if the fitting is good, as you this test is only for the null that the
coefficient is 0 (a is 0 in y=exp(a*x), right?)?
On Thu, Feb 7, 2013 at 10:48 AM, S Ellison s.elli...@lgcgroup.com wrote:
After applying
Liang:
In nonlinear models especially (and more generally, also), small p
values are not reliable indicators of whether a fit is or is
notgood. I would strongly suggest that you consult with your local
statistician -- this is a (complicated, as it depends on the meaning
of good) statistical
Thanks, Ellison. Another question is if this p-value is a good parameter to
test if the fitting is good,
Absolutely not.
***
This email and any attachments are confidential. Any use, copying or
disclosure other than by the
After applying the NLS for a model like y=exp(a*x), and I get a result
showing the summary as:
Estimate Std. Error t value Pr(|t|)
2.6720 1.4758 1.811 0.3212
My question is what this t-statistics tests? And what's the meaning of Pr?
New to R. Thanks.
[[alternative HTML version
On Sun, Feb 3, 2013 at 1:50 AM, Bert Gunter gunter.ber...@gene.com wrote:
A related approach which, if memory serves, was originally in S eons
ago, is to define a doc attribute of any function (or object, for
that matter) that you wish to document that contains text for
documentation and a
On 02/02/2013 02:21 AM, li li wrote:
Thanks so much for the reply, Ista. I used plotrix library.
Here is my example:
xx- seq(0.05, 0.95, by=0.05)
lower- c(-2.896865, -2.728416, -2.642574, -2.587724, -2.548672, -2.518994,
-2.495409, -2.476031, -2.459662, -2.445513, -2.433014, -2.421739,
Dear All,
I would like to ask a question on how to incorporate into an R script help
information for the user. I vaguely recall that I saw some instructions on an R
manual, but am not able to figure them out. Hereunder is the basic setting:
1. I finished writing an R script, my_script.r, that
The normal expectations of an R user is that useful functions you want to share
are in packages, which include help files. There is no way to both avoid the
package development process and offer help to the user within R. Read the
Writing R Extensions document for the most up-to-date
On Sat, Feb 2, 2013 at 6:31 PM, Chee Chen chen...@purdue.edu wrote:
Dear All,
I would like to ask a question on how to incorporate into an R script help
information for the user. I vaguely recall that I saw some instructions on an
R manual, but am not able to figure them out. Hereunder is
A related approach which, if memory serves, was originally in S eons
ago, is to define a doc attribute of any function (or object, for
that matter) that you wish to document that contains text for
documentation and a doc() function of the form:
doc - function(obj) cat(attr(obj,doc))
used as:
There are many plotCI functions in many different packages... which
one are you referring to? Also please construct a reproducible example
illustrating your problem.
Best,
Ista
On Thu, Jan 31, 2013 at 11:58 PM, li li hannah@gmail.com wrote:
Hi all,
In my plotCI function, the argument x
Thanks so much for the reply, Ista. I used plotrix library.
Here is my example:
xx - seq(0.05, 0.95, by=0.05)
lower - c(-2.896865, -2.728416, -2.642574, -2.587724, -2.548672, -2.518994,
-2.495409, -2.476031, -2.459662, -2.445513, -2.433014, -2.421739, -2.411344,
-2.401536, -2.392040, -2.382571,
You haven't given any y values to plotCI.
Try, for example,
plotCI(xx, (lower+upper)/2, ui=upper, (etc)
What you got was in effect
plot( seq(along=xx), xx )
which is standard behavior for plot() when no y values are supplied.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
Hi all,
In my plotCI function, the argument x is chosen to be seq(0.05, 0.95,
by=0.05).
However, when I make the plot, the plot has the x coordinate goes 1:19.
Does anyone know how to make the x coordinate to be (0,0.5, 0.1, ...,
0.95).
Thank you.
Hanna
[[alternative HTML
Hello again,
Ley say I have 1 matrix and 1 data frame:
mat - matrix(1:15, 5)
match_df - data.frame(Seq = 1:5, criteria = sample(letters[1:5], 5, replace
= T))
mat
[,1] [,2] [,3]
[1,]16 11
[2,]27 12
[3,]38 13
[4,]49 14
[5,]5 10 15
Hello,
Something like this?
do.call(rbind, lapply(split(as.data.frame(mat), match_df$criteria),
colSums))
Hope this helps,
Rui Barradas
Em 24-01-2013 19:39, Christofer Bogaso escreveu:
Hello again,
Ley say I have 1 matrix and 1 data frame:
mat - matrix(1:15, 5)
match_df -
# a 5 10 15
# b 5 15 25
# d 2 7 12
# e 3 8 13
A.K.
- Original Message -
From: Christofer Bogaso bogaso.christo...@gmail.com
To: r-help r-help@r-project.org
Cc:
Sent: Thursday, January 24, 2013 2:39 PM
Subject: [R] Question on matrix
-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of arun
Sent: Thursday, January 24, 2013 2:27 PM
To: Christofer Bogaso
Cc: R help
Subject: Re: [R] Question on matrix calculation
Hi,
You could also use:
mat - matrix(1:15, 5)
set.seed(5)
match_df
Dear R-Users,
I have a question concerning the determination of breakpoints and
comparison of slopes from broken-line regression models. Although this
is rather a standard problem in data analysis, all information I
gathered so far, did not answer my questions.
I added a subsetted example
On Jan 12, 2010, at 2:13 AM, Benedikt Drosse wrote:
Dear R-Users,
I have a question concerning the determination of breakpoints and
comparison of slopes from broken-line regression models. Although
this is rather a standard problem in data analysis, all information
I gathered so far,
I happened to see these:
round(.5, 0)
[1] 0
round(1.5, 0)
[1] 2
round(2.5, 0)
[1] 2
round(3.5, 0)
[1] 4
round(4.5, 0)
[1] 4
What is the rule here?
Should not round(.5, 0) = 1, round(2.5, 0) = 3 etc?
Thanks and regards,
__
R-help@r-project.org
?round explicitly says:
Note that for rounding off a 5, the IEC 60559 standard is expected to be
used, â*go to the even digit*â. Therefore round(0.5) is 0 and round(-1.5)is
-2. However, this is dependent on OS services and on representation error
(since e.g. 0.15 is not represented exactly,
On Jan 3, 2013, at 11:44 AM, Christofer Bogaso bogaso.christo...@gmail.com
wrote:
I happened to see these:
round(.5, 0)
[1] 0
round(1.5, 0)
[1] 2
round(2.5, 0)
[1] 2
round(3.5, 0)
[1] 4
round(4.5, 0)
[1] 4
What is the rule here?
Should not round(.5, 0) = 1, round(2.5, 0) = 3
On 03-01-2013, at 18:44, Christofer Bogaso bogaso.christo...@gmail.com wrote:
I happened to see these:
round(.5, 0)
[1] 0
round(1.5, 0)
[1] 2
round(2.5, 0)
[1] 2
round(3.5, 0)
[1] 4
round(4.5, 0)
[1] 4
What is the rule here?
Should not round(.5, 0) = 1, round(2.5, 0) = 3
Hello,
The format AM/PM should be for display purposes only, when you use
format() you get a variable of class character, not of classes
POSIXct POSIXt . Produce a variable y with as.POSIXct (without
AM/PM) for arithmetics and another formated for display.
Hope this helps,
Rui Barradas
Em
On Dec 31, 2012, at 9:40 PM, Christofer Bogaso wrote:
On 01 January 2013 03:00:18, David Winsemius wrote:
On Dec 31, 2012, at 11:57 AM, David Winsemius wrote:
On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote:
On 01 January 2013 01:29:53, David Winsemius wrote:
On Dec 31, 2012, at
-01 11:00:00 AM
#2 2013-01-01 11:15:00 AM
A.K.
- Original Message -
From: Christofer Bogaso bogaso.christo...@gmail.com
To: David Winsemius dwinsem...@comcast.net; David L Carlson
dcarl...@tamu.edu
Cc: r-help@r-project.org
Sent: Tuesday, January 1, 2013 12:40 AM
Subject: Re: [R
To: David Winsemius dwinsem...@comcast.net; David L Carlson
dcarl...@tamu.edu
Cc: r-help@r-project.org
Sent: Tuesday, January 1, 2013 12:40 AM
Subject: Re: [R] Question on creating Date variable
On 01 January 2013 03:00:18, David Winsemius wrote:
On Dec 31, 2012, at 11:57 AM, David Winsemius
Winsemius dwinsem...@comcast.net; David L Carlson dcarl...@tamu.edu
Cc: r-help@r-project.org
Sent: Tuesday, January 1, 2013 12:40 AM
Subject: Re: [R] Question on creating Date variable
On 01 January 2013 03:00:18, David Winsemius wrote:
On Dec 31, 2012, at 11:57 AM, David Winsemius wrote
Hello all,
Let say I have following (numeric) vector:
x
[1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14 14.50
14.75 14.85 15.51 14.64
Now, I want to create a 'Date' variable (i.e. I should be able to do all
calculations pertaining to date/time and also time-series plotting
Hello,
Try the following.
x - scan(text = 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01
13.14 14.50 14.75 14.85 15.51 14.64 )
hours - floor(x)
mins - (100*x) %% 100
as.POSIXct(paste(Sys.Date(), hours, mins), format = %Y-%m-%d %H %M)
As you can see, there are three values of 'x'
On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote:
Hello all,
Let say I have following (numeric) vector:
x
[1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14
14.50 14.75 14.85 15.51 14.64
Now, I want to create a 'Date' variable (i.e. I should be able to do
all
On 01 January 2013 00:17:50, David Winsemius wrote:
On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote:
Hello all,
Let say I have following (numeric) vector:
x
[1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14 14.50
14.75 14.85 15.51 14.64
Now, I want to create a 'Date'
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote:
On 01 January 2013 00:17:50, David Winsemius wrote:
On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote:
Hello all,
Let say I have following (numeric) vector:
x
[1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14
On 01 January 2013 01:29:53, David Winsemius wrote:
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote:
On 01 January 2013 00:17:50, David Winsemius wrote:
On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote:
Hello all,
Let say I have following (numeric) vector:
x
[1] 11.00 11.25
On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote:
On 01 January 2013 01:29:53, David Winsemius wrote:
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote:
On 01 January 2013 00:17:50, David Winsemius wrote:
On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote:
Hello all,
Let
-project.org
Subject: Re: [R] Question on creating Date variable
On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote:
On 01 January 2013 01:29:53, David Winsemius wrote:
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote:
On 01 January 2013 00:17:50, David Winsemius wrote
On Dec 31, 2012, at 11:57 AM, David Winsemius wrote:
On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote:
On 01 January 2013 01:29:53, David Winsemius wrote:
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote:
On 01 January 2013 00:17:50, David Winsemius wrote:
On Dec 31, 2012,
.
- Original Message -
From: Christofer Bogaso bogaso.christo...@gmail.com
To: r-help@r-project.org
Cc:
Sent: Monday, December 31, 2012 12:12 PM
Subject: [R] Question on creating Date variable
Hello all,
Let say I have following (numeric) vector:
x
[1] 11.00 11.25 11.35 12.01 11.14 13.00
On 01 January 2013 03:00:18, David Winsemius wrote:
On Dec 31, 2012, at 11:57 AM, David Winsemius wrote:
On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote:
On 01 January 2013 01:29:53, David Winsemius wrote:
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote:
On 01 January 2013
Dear All,
A semi-trivial question: suppose you want to carry out a linear regression
of the kind
y~x1+x2+x3
where x3 is a dichotomous variable assuming only 0 and 1 values (x1 and x2
are continuous variables).
Is there any particular caveat I should be aware of? Can I code this as a
You can run that as it is. The term to search for on Google is 'dummy
coding'.
Jeremy
On 28 December 2012 07:45, Lorenzo Isella lorenzo.ise...@gmail.com wrote:
where x3 is a dichotomous variable assuming only 0 and 1 values (x1 and x2
are continuous variables).
Is there any particular
Hi,
I have the following data:
0 12
1 10
1 4
1 6
1 7
1 13
2 21
2 23
2 20
3 18
3 17
3 16
3 27
3 33
4 11
4 8
4 19
4 16
4 9
In this data file I would like to sum the numbers of second column which
belong to the same number in the first column.
So the output
Hi,
You can follow this example:
test - structure(list(V1 = c(0L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L), V2 = c(12L, 10L, 4L, 6L,
7L, 13L, 21L, 23L, 20L, 18L, 17L, 16L, 27L, 33L, 11L, 8L, 19L,
16L, 9L)), .Names = c(V1, V2), class = data.frame, row.names =
Hi, T. Bal,
homework? Take a look at
?tapply
Regards -- Gerrit
On Tue, 4 Dec 2012, T Bal wrote:
Hi,
I have the following data:
0 12
1 10
1 4
1 6
1 7
1 13
2 21
2 23
2 20
3 18
3 17
3 16
3 27
3 33
4 11
4 8
4 19
4 16
4 9
In this data file I would
On 04-12-2012, at 08:59, T Bal wrote:
Hi,
I have the following data:
0 12
1 10
1 4
1 6
1 7
1 13
2 21
2 23
2 20
3 18
3 17
3 16
3 27
3 33
4 11
4 8
4 19
4 16
4 9
In this data file I would like to sum the numbers of second column
-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of T Bal
Sent: 04 December 2012 07:59
To: r-help@r-project.org
Subject: [R] question about sum of (column) elements in R
Hi,
I have the following data:
0 12
1 10
1 4
1 6
1 7
1 13
2 21
2 23
2 20
3 18
3 17
3
0 12
#2 1 40
#3 2 64
#4 3 111
#5 4 63
A.K.
- Original Message -
From: T Bal studentt...@gmail.com
To: r-help@r-project.org
Cc:
Sent: Tuesday, December 4, 2012 2:59 AM
Subject: [R] question about sum of (column) elements in R
Hi,
I have the following data:
0 12
1 10
1 4
1
DID YOU SOLVE THE PROBLEM?
--
View this message in context:
http://r.789695.n4.nabble.com/question-about-A2R-tp4640539p4650952.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Folks,
I have been using the VAR {vars} program to find a fit for the following
bi-variate time series (subset):
bivariateTS-structure(c(0.950415958293559, 0.96077848972081,
0.964348957109053,
0.967852884998915, 0.967773510751625, 0.970342843688257, 0.97613937178359,
0.980118627997436,
Dear All,
I am Ph.D student at Chulalongkorn University in Thailand, I want to use
Package 'sampleSection' to estimate missing data which generate under IRT
model(3-PL);
n-500 ## number of examinee
I-20 ## number of items
num.imp-5 ##number of imputations
p.missing-c(0.09, 0.01) #prob of
Hello all,
I hope someone of you can help me out, I have searched other posts as well
but I can't find any solution to the problem I'm dealing with.
I want to make a histogram from the data Telephone Lines
MDGdataset -read.csv(MDG_dataset_2010.csv, header=T)
MDGdatasetAdapted -
Most likely the value you are using in the 'hist' function is a
factor. It would help if you included an 'str' of the object you are
using.
On Sun, Nov 18, 2012 at 4:45 PM, 9man lucas_9...@hotmail.com wrote:
Hello all,
I hope someone of you can help me out, I have searched other posts as well
, TX 77843-4352
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of 9man
Sent: Sunday, November 18, 2012 3:45 PM
To: r-help@r-project.org
Subject: [R] Question about making histogram and x must be numeric
Hello all,
I hope
On 12-11-17 1:51 PM, John Muschelli wrote:
That works! Thanks for the help, but I can't seem to figure out why
this happens with even one contour in the example below:
Disclaimer: using MNI template from FSL
(http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases).
Firefox still has array initialiser
On 12-11-17 3:11 PM, Duncan Murdoch wrote:
On 12-11-17 1:51 PM, John Muschelli wrote:
That works! Thanks for the help, but I can't seem to figure out why
this happens with even one contour in the example below:
Disclaimer: using MNI template from FSL
That works! Thanks for the help, but I can't seem to figure out why this
happens with even one contour in the example below:
Disclaimer: using MNI template from FSL (
http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases).
Firefox still has array initialiser too large for this one contour, but
Safari
I saw that in rgl:::writeWebGL that Polygons will only be rendered as
filled; there is no support in WebGL for wireframe or point rendering.. I
found that you can easily use contour3d to make reproducible contour web
figures, such as (taken from contour3d help)
library(AnalyzeFMRI)
a -
On 12-11-16 5:59 PM, John Muschelli wrote:
I saw that in rgl:::writeWebGL that Polygons will only be rendered as
filled; there is no support in WebGL for wireframe or point rendering.. I
found that you can easily use contour3d to make reproducible contour web
figures, such as (taken from
On 12-11-16 7:09 PM, John Muschelli wrote:
The contour its just half a brain and the vertices are not surfaces and
are filled in
Sounds like a bug in the browser. When I try it in Firefox 16.0.2 it
doesn't display properly; the error log (found via Tools | Web developer
| Error console has
Dear all,
I am Ph.D student at Chulalongkorn University in Thailand, I use package 'MICE'
and 'Amelia II' to impute missing data assump MAR and MNAR. I don't have
problem to impute under MAR, but I don't know how to impute MNAR. My MNAR data
generate under IRT model(3-PL);
n-500 ## number of
I don't understand why I get the following results. I define two classes
'Base' and 'Derived', the latter of which 'contains' the first. I then
define a generic method 'test' and overload it for each of these classes. I
call 'callNextMethod()' in the overload for Derived. From the output, it
On 11/06/2012 07:03 AM, Simon Knapp wrote:
I don't understand why I get the following results. I define two classes
'Base' and 'Derived', the latter of which 'contains' the first. I then
define a generic method 'test' and overload it for each of these classes. I
call 'callNextMethod()' in the
Simon Knapp sleepingw...@gmail.com writes:
I don't understand why I get the following results. I define two classes
'Base' and 'Derived', the latter of which 'contains' the first. I then
define a generic method 'test' and overload it for each of these classes. I
call 'callNextMethod()' in the
On 11/2/2012 11:11 AM, Ni, Shenghua wrote:
r-c(1,1,9,1,1,1)
col_no-cut(r,c(0,2,3,6,8,10,100))
levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%)
col_no
[1] 2% 2% 8-10% 2% 2% 2%
Levels: 2% 2-4% 4-6% 6-8% 8-10% 10%
Yes.
(Or, I get the same output from this code. What is the question?)
On Nov 2, 2012, at 11:51 AM, Berend Hasselman wrote:
On 02-11-2012, at 19:11, Ni, Shenghua wrote:
r-c(1,1,9,1,1,1)
col_no-cut(r,c(0,2,3,6,8,10,100))
levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%)
col_no
[1] 2% 2% 8-10% 2% 2% 2%
Levels: 2% 2-4% 4-6% 6-8% 8-10% 10%
Where is
On Nov 6, 2012, at 22:16 , Brian Diggs wrote:
On 11/2/2012 11:11 AM, Ni, Shenghua wrote:
r-c(1,1,9,1,1,1)
col_no-cut(r,c(0,2,3,6,8,10,100))
levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%)
col_no
[1] 2% 2% 8-10% 2% 2% 2%
Levels: 2% 2-4% 4-6% 6-8% 8-10% 10%
Yes.
(Or, I get the
r-c(1,1,9,1,1,1)
col_no-cut(r,c(0,2,3,6,8,10,100))
levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%)
col_no
[1] 2% 2% 8-10% 2% 2% 2%
Levels: 2% 2-4% 4-6% 6-8% 8-10% 10%
[[alternative HTML version deleted]]
__
R-help@r-project.org
On 02-11-2012, at 19:11, Ni, Shenghua wrote:
r-c(1,1,9,1,1,1)
col_no-cut(r,c(0,2,3,6,8,10,100))
levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%)
col_no
[1] 2% 2% 8-10% 2% 2% 2%
Levels: 2% 2-4% 4-6% 6-8% 8-10% 10%
Where is the question?
Berend
Thank you for your replay and help !!
Best Regards, Young.
--
View this message in context:
http://r.789695.n4.nabble.com/Question-about-survdiff-in-for-loop-tp4646707p4646827.html
Sent from the R help mailing list archive at Nabble.com.
__
Hi everyone!!
I have dataset composed of a numbers of survival analyses.
( for batch survival analyses by using for-loop) .
Here are code !!
###
dim(svsv)
Num_t-dim(svsv)
Num-Num_t[2] # These are predictors !!
names=colnames(svsv)
for (i in 1:Num )
{
name_tt=names[i]
On Fri, Oct 19, 2012 at 8:02 PM, Sando chocosa...@daum.net wrote:
Hi everyone!!
I have dataset composed of a numbers of survival analyses.
( for batch survival analyses by using for-loop) .
Here are code !!
###
dim(svsv)
Num_t-dim(svsv)
Num-Num_t[2] # These are predictors !!
I was looking at rank() and I came across:
...
first = sort.list(sort.list(xx)), ...
line 32 of rank.r [1]
sort.list(x) returns the indices of the values of x in ascending (by
default) order. So sort.list(sort.list(x)) returns the same list.
So, what am I missing here?
-Tyler
[1]
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of Tyler Ritchie
Sent: Tuesday, October 16, 2012 2:23 PM
To: r-help@r-project.org
Subject: [R] Question about use of sort.list(sort.list(x)) in rank.r
I was looking at rank
It is easy to get a cumulative hazard curve.
First, decide what values of age, a, and b you want curves for
tdata- data.frame(age=55, a=2, b=6)
Get the curves, there will be one for each strata in the output
sfit- survfit(coxPhMod, newdata= tdata)
Plot them
plot(sfit, fun='cumhaz',
lau pel wrote
Hi,
I'm going crazy trying to plot a quite simple graph.
i need to plot estimated hazard rate from a cox model.
supposing the model i like this:
coxPhMod=coxph(Surv(TIME, EV) ~ AGE+A+B+strata(C) data=data)
with 4 level for C.
how can i obtain a graph with 4 estimated (better
Hi,
I'm going crazy trying to plot a quite simple graph.
i need to plot estimated hazard rate from a cox model.
supposing the model i like this:
coxPhMod=coxph(Surv(TIME, EV) ~ AGE+A+B+strata(C) data=data)
with 4 level for C.
how can i obtain a graph with 4 estimated (better smoothed) hazard curve
Hi,
I need some help with making a function a bit more elegant. How would you
all suggest avoiding the problem I've made myself below - I've written a
function that creates a temporary matrix by subseting a larger one I assign
it. I then call vectors from that matrix, add each item in the vector
Hello,
Inline.
Em 20-09-2012 22:48, Benjamin Caldwell escreveu:
Hi,
I need some help with making a function a bit more elegant.
Yes you do!
Below, your first function, for instance, becomes a one liner.
Trick: R is vectorized. Use functions that act on whole vectors,
avoiding loops.
On 12-09-17 06:00 AM, r-help-requ...@r-project.org wrote:
Date: Sun, 16 Sep 2012 14:41:42 -0500
From: Dirk Eddelbuettele...@debian.org
To: Eberle, Anthonyae...@allstate.com
Cc:r-help@r-project.org
Subject: Re: [R] Question about R performance on UNIX/LINUX with
different memory
Does anyone have any guidance on swap and memory configuration when
running R v2.15.1 on UNIX/LINUX? Through some benchmarking across
multiple hardware (UNIX, LINUX, SPARC, x86, Windows, physical, virtual)
it seems that the smaller memory machines have an advantage.
Typically my organization
On 16 September 2012 at 13:30, Eberle, Anthony wrote:
| Does anyone have any guidance on swap and memory configuration when
| running R v2.15.1 on UNIX/LINUX? Through some benchmarking across
| multiple hardware (UNIX, LINUX, SPARC, x86, Windows, physical, virtual)
| it seems that the smaller
My first criteria is to make sure my application never swaps/pages due
to memory issues -- have enough physical memory so it never happens
and control what else is running on the machine. Once you start
paging, performance takes a real hit.
On Sun, Sep 16, 2012 at 2:30 PM, Eberle, Anthony
Dear R users,
Hopefully someone can help me,
Maybe I just misunderstand the function in the package?
I am working with a logistic regression model.
Until now I always worked with the basic glm function, where for the model
was:
¡§ glm( disease ~ test.value + cnct ,
Hi
I am comparing four different linear mixed effect models, derived from updating the original one. To
compare these, I want to use anova(). I therefore do the following (not reproducible - just to
illustration purpose!):
dat - loadSPECIES(SPECIES)
subs - expression(dead==FALSE
Models with different fixed effects estimated by REML cannot be
compared by anova.
In future, please post questions on mixed effects models on the
r-sig-mixed-effects mailing lists. You're likely to receive more
informative replies there, too.
-- Bert
On Wed, Aug 22, 2012 at 7:23 AM, Rainer M
On 22/08/12 16:36, Bert Gunter wrote:
Models with different fixed effects estimated by REML cannot be
compared by anova.
I have seen that much in Modern Applied Statistics in S, and therefore have chosen the
model = ML
In future, please post questions on mixed effects models on the
Oops -- missed that. OTOH, my reply demonstrates the value of the
mixed models list recommendation.
-- Bert
On Wed, Aug 22, 2012 at 7:55 AM, Rainer M Krug r.m.k...@gmail.com wrote:
On 22/08/12 16:36, Bert Gunter wrote:
Models with different fixed effects estimated by REML cannot be
compared
Further discussed on r-sig-mixed-models
Rainer
On 22/08/12 17:04, Bert Gunter wrote:
Oops -- missed that. OTOH, my reply demonstrates the value of the
mixed models list recommendation.
-- Bert
On Wed, Aug 22, 2012 at 7:55 AM, Rainer M Krug r.m.k...@gmail.com wrote:
On 22/08/12 16:36, Bert
601 - 700 of 2383 matches
Mail list logo