Hi all:
I have two curve models:
model1<-nls(result ~ exp(b0 + b1*(time)), start = list(b0 = 0, b1 =
5),trace=TRUE,data=data1)
model2<-nls(result ~ exp(b0 + b1*(time)), start = list(b0 = 0, b1 =
5),trace=TRUE,data=data2)
I wanna compare the two models to find out whether the difference betwe
v1<-c("a","b","c","d")
v2<-c("a","b","e")
v3<-c("a","f","g")
I want to get the intersection of v1,v2,v3,ie "a"
How can I do then?
What I know is only for 2 vectors via "intersect" function,but don't know how
to deal with multiple vectors.
Many thanks
[[alternative HTML versio
Thanks£¡
ÔÚ 2012-01-13 10:51:14£¬"Jorge I Velez" дµÀ£º
Hi,
Use %in% instead of ==.
HTH,
Jorge.-
On Thu, Jan 12, 2012 at 9:36 PM, ÃÏÐÀ <> wrote:
Hi all
I have a question about "subset" function.
> dat
id x1 x2 x3
1 a 1 11 111
2 b 2 22 222
3 c 3 33 333
4 d 4 44 444
> subs
Many thanks for your elaborated explaina.
At 2012-01-13 11:34:51,"R. Michael Weylandt" wrote:
>As Jorge noted, the fix is to use "%in%": a fuller explanation of why
>`==` didn't work is that it implicitly used vector recycling: look at
>
>with(data, id == c("a", "c"))
>
>implicitly, this e
Hi all
I have a question about "subset" function.
> dat
id x1 x2 x3
1 a 1 11 111
2 b 2 22 222
3 c 3 33 333
4 d 4 44 444
> subset(dat,id==c("a","c"))
id x1 x2 x3
1 a 1 11 111
> subset(dat,id==c("a","d"))
id x1 x2 x3
1 a 1 11 111
4 d 4 44 444
>From the above, if I choos
Thanks
At 2012-01-11 16:55:32,"Jeff Newmiller" wrote:
>You cannot install 64-bit R on 32-bit OS, but you can install a 32-bit R on a
>64-bit OS, and you can later install 64-bit R as well. That is, installing
>32-bit R does not interfere with your option to later install a 64-bit R.
>--
Hi all:
My OS is 32bit winxp,but I wanna install 64bit R2.14.1.
>From the following website,it says "You can also go back and add 64-bit
>components to a 32-bit install, or vice versa"
http://cran.r-project.org/bin/windows/rw-FAQ.html#Can-both-32_002d-and-64_002dbit-R-be-installed-on-the-same-
Yes£¬I find out later.
rev is only reverse the order.
What I use is !
Thanks
At 2012-01-06 16:07:11,"Petr PIKAL" wrote:
>Hi
>
>> [R] question about rev
>>
>> Hi,all:
>> I have a vector,and wanna get the opposite value via rev function.
>>
>>
>> > a
>> [1] FALSE FALSE TRUE TRUE TRU
Hi,all:
I have a vector,and wanna get the opposite value via rev function.
> a
[1] FALSE FALSE TRUE TRUE TRUE
>
> rev(a)
[1] TRUE TRUE TRUE FALSE FALSE
>
I don't know why the 3rd "TRUE" has not been reversed,while all other values
are reversed?
Thanks
My best
[[alternati
Sorry for some typo last mail.
I corrected it,and resent.Sorry for it.
Sir:
I find out that for 2 level factor, if I set it to "factor", then I'll get
error reply.
For the instance last mail, if I use:
result1<-glm(y ~ factor(gender),family = binomial);#gender has 2 levels
logistic.display
Sir:
I find out that for 2 level factor, if I set it to "factor", then I'll get
error reply.
For the instance last mail, if I use:
result1<-glm(y ~ gender,family = binomial);#gender has 2 levels
logistic.display(result1)
Error in coeff[, 1] : incorrect number of dimensions
if I use:
res
Yes,it works well.
Thanks for your help.
At 2011-12-14 13:06:14,"Jorge I Velez" wrote:
Hi lm_mengxin,
If that's the case, just use as.factor():
> fit <- glm(case ~ as.factor(induced) + as.factor(spontaneous),
> family=binomial, data=infert)
> logistic.display(fit)
Yes,I¡¡understand.
Thanks for your help.
At 2011-12-14 13:53:21,"Virasakdi Chongsuvivatwong" wrote:
logistic.display need a rather tidy model ie all independent variables must be
the original name not any function of a variable in the dataset of the model.
If data1 is your dataset containin
According to the example of logistic.display:
model0 <- glm(case ~ induced + spontaneous, family=binomial, data=infert)
summary(model0)
logistic.display(model0)
induced: 3levels 0,1,2
spontaneous: 3levels 0,1,2
So if 0 is reference, we should get 2 OR for " induced1"," induced2","
spontane
Hi sir:
I follow your suggestion:
result<-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial)
logistic.display(result)
Error in coeff[, 1] : incorrect number of dimensions
At 2011-12-14 01:59:36,"Jorge I Velez" wrote:
Hi there,
Try
require(epicalc)
logistic.display(re
Hi all:
My data has 3 variables:
age(3levels : <30y=1 30-50y=2, >50y=3)
gender(Male=0, Female=1)
CD4 cell count(raw lab measurement)
y(1:death 0:alive)
I perform logistic regression to find out the factors that influence y.
result<-glm(y ~ factor(age) + factor(gender) + CD4,family = binomial
Hi all:
I perform the linear mixed model for 300 persons, y is CD4 count,x is time.
I randomized slope and intercept,so I can get 300 slopes and 300 intercepts.Now
I wanna test wheter the variance of 300 slopes and 300 intercepts differs from
zero. If the variance of 300 slopes(or intercepts) d
Hello sir:
I have a question about the axis label of scatterplot3d function.
The data is in the attachment.
If I use the command:
scatterplot3d(x,y,z,type="h")
I want the plot's x-axis lab to be 1,2,3,...,13, y-axis lab to be 1,2,3,...11
But if I use the command:
scatterplot3d(x,y,z,type="h"
Hi all:
I've 2 groups of data,which are measured at:
1990,1991,1992,...2000.
I wanna know whether the trend of 2 groups are same or not.
Maybe time series analysis is suitable,but I don't know which index is fit for
my purpose,and how to get the index from function of time series analysis unde
As the attachement,I wanna draw multi group plot.
But I can only use :
plot(x,y...)
points(...)
It's a heavy work to use these command if there're too many groups to be drawn
because I have to use point() for many times.
I wanna know wheter there's command which can draw the multigroup pl
Hi all:
As to the "heatmap" function, the default style is "red and yellow",and red
refers to low level and yellow refers to high level.
How can I change the style to the contrary: red refers to high level and yellow
refers to low level?
Thanks a lot!
My best
[[alternative HTML version d
Hi all:
I am a user of "JM" package.
Here's the problem of "sample size".
The warning is:
Error in jointModel(fitLME, fitSURV_death, timeVar = "time", method =
"piecewise-PH-GH") :
sample sizes in the longitudinal and event processes differ.
According to the suggestion of "missing data",
Hell sir:
I'm a user of JM and have a quesion.
As to "JM: An R Package for the Joint Modelling of Longitudinal and
Time-to-Event Data", on page14:
fitSURV <- coxph(Surv(Time, death) ~ drug, data = aids.id, x = TRUE)
I don't understand why use the dataset "aids.id", but not"aids" as follow:
fitSU
Hi all:
I have a question about the command "followup.plot" of epicale package.
As to the demo data "Orthodont", the command "followup.plot" works well.But if
I delete some rows of data(delete Male data,and keep Female data only, for
instance),the command can't work,and the warning is "In attr(
Hi all:
In the growth model (Ref.Multilevel Modeling in R (2.3)),I have a question
about the variance:
On p.73, it says:"To model decreasing variance one can use the varExp option.
In cases where variance increases can use the varFixed option (see Pinheiro &
Bates, 2000 for details)."
My que
Hi all:
In the expression:
lme(y~1,random=~1|time)
What "~1" stands for?
Thanks a lot!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hello all:
I've read the document named "A Brief Introduction to R, the multilevel package
and the nlme package".
At p68, one can transform the dataset to the required format by using
"make.univ".
I wanna know,how the new variable "MULTDV" is calculated(can you show me the
formula if possible pl
Hi all:
I finished cox analysis like this:
fit_cox<-coxph(Surv(dat$Time, dat$death) ~ dat$CD4 +
strata(dat$gender),data=dat);
> fit_cox
Call:
coxph(formula = Surv(data_ori$Time, data_ori$death) ~ data_ori$drug +
strata(data_ori$gender), data = data_ori)
coef exp(coef) se(co
28 matches
Mail list logo