Machiavelli 3,
34132 Trieste (Italy)
tel. +39 040 671184
fax +39 040 671160
original message --
Message: 14
Date: Fri, 14 Mar 2014 05:25:42 -0700 (PDT)
From: tahaus
To: r-help@r-project.org
Subject: [R] Random effects model with PLM: "System is computatio
Dear readers,
I am currently trying to estimate some panel data models in R using PLM
package. This includes the estimation of basic pooled, fixed effects and
random effects models. Therefore I make use of this code:
Now here's the problem:
Now here's the problem: I can without any problem esti
om: rex2013 <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=4655802&i=1>>
>
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4655802&i=2>
> Cc:
> Sent: Wednesday, January 16, 2013 5:06 AM
> Subject: Re: [R] random effec
ou to read lme4 book
(http://lme4.r-forge.r-project.org/lMMwR/)
#lrgprt.pdf
A.K.
- Original Message -
From: rex2013
To: r-help@r-project.org
Cc:
Sent: Wednesday, January 16, 2013 5:06 AM
Subject: Re: [R] random effects model
Hi
I tried removing the missing values and installing &qu
.jtp?type=node&node=4655612&i=0>>
>
> To: arun <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=4655612&i=1>>
>
> Cc: R help <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=4655612&i=2>>
>
> Sent:
library(lme4)
>fm1<-lmer(HiBP~time+(1|CODEA), family=binomial,data=BP.stack3) #check codes,
>not sure
>print(dotplot(ranef(fm1,post=TRUE),
> scales = list(x = list(relation = "free")))[[1]])
>qmt1<- qqmath(ranef(fm1, postVar=TRUE))
>print(qmt1[[1]])
>
t; fm1<-lmer(HiBP~time+(1|CODEA), family=binomial,data=BP.stack3) #check
> codes, not sure
> print(dotplot(ranef(fm1,post=TRUE),
> scales = list(x = list(relation = "free")))[[1]])
> qmt1<- qqmath(ranef(fm1, postVar=TRUE))
> print(qmt1[[1]])
>
> A.K
could try lmer() from lme4.
library(lme4)
fm1<-lmer(HiBP~time+(1|CODEA), family=binomial,data=BP.stack3) #check codes,
not sure
print(dotplot(ranef(fm1,post=TRUE),
scales = list(x = list(relation = "free")))[[1]])
qmt1<- qqmath(ranef(fm1, postVar=TRUE))
print(qmt1[
0 0 1 1 0 1
#8.1 8 0 1 0 1 1 1
#3.2 3 0 1 0 2 1 1
#7.2 7 0 0 1 2 1 1
#8.2 8 0 1 0 2 0 0
A.K.
- Original Message -
Fr
] # your code was BP.sub5a <-
> BP.sub3a[order(BP.sub5a$CODEA),]
>
> ^ was not defined before
> #Next line
> BPsub3$Categ[BPsub6$Overweight==1&BPsub3$time==1&BPsub3$Obese==0]<-
> "Overweight14" #It should be BP.sub3 and what is BPsub6, it was n
set=!(is.na(Sex)| is.na(Education)|is.na
> (Birthplace)|is.na(Education)|is.na(hibp14)| is.na(hibp21)))
> nrow(BP.sub3a)
> #[1] 3364
> BP.sub5a <- BP.sub3a[order(BP.sub3a$CODEA),] # your code was BP.sub5a <-
> BP.sub3a[order(BP.sub5a$CODEA),]
>
> ^ was not defined before
fore
#Next line
BPsub3$Categ[BPsub6$Overweight==1&BPsub3$time==1&BPsub3$Obese==0]<-
"Overweight14" #It should be BP.sub3 and what is BPsub6, it was not defined
previously.
#Error in BPsub3$Categ[BPsub6$Overweight == 1 & BPsub3$time == 1 & BPsub3$Obese
== :
#object
To: arun
Sent: Sunday, January 13, 2013 1:51 AM
Subject: Re: [R] random effects model
HI AK
Thanks a lot for explaining that.
1. With the chi sq. ( in order to find out if the diffce is significant between
groups) do I have create a separate excel file and make a dataframe.How do I go
nathan
To: arun
Cc: R help
Sent: Saturday, January 12, 2013 5:59 PM
Subject: Re: [R] random effects model
Hi AK
That works. I was trying to get similar results from any other package. Being
a beginner, I was not sure how to modify the syntax to get my output.
lapply(split(BP_2bSexNoMV,BP_
Hi AK
That works. I was trying to get similar results from any other package.
Being a beginner, I was not sure how to modify the syntax to get my output.
lapply(split(BP_2bSexNoMV,BP_
2bSexNoMV$Sex),function(x) (nrow(x[!complete.cases(x[,-2]),])/nrow(x))*100)
#gives the percentage of rows of miss
68690096%" "23.3865814696486%" "23.3865814696486%"
#Male "25.814696485623%" "29.1533546325879%" "29.1533546325879%"
# hibp14 hibp21
#Female "24.1693290734824%" "31.3418530351438%"
#Male &qu
(is.na(x[,-1]))/nrow(x))*100,"%",sep="")))
From ur reply, it seemed like you were trying different codes:
as data(df,package, package="vmv")
A.K.
From: Usha Gurunathan
To: arun
Cc: R help
Sent: Saturday, January 12, 2013 1:42 A
lapply(split(dat1,dat1$Gender),function(x)
paste((colSums(is.na(x[,-1]))/nrow(x))*100,"%",sep="")))
colnames(res)<-colnames(dat1)[-1]
res
# V1 V2
#F "0%" "20%"
#M "50%" "20%"
A.K.
- Original Message -
From: rex2
(dat1,dat1$Gender),function(x)
> paste((colSums(is.na(x[,-1]))/nrow(x))*100,"%",sep="")))
> colnames(res)<-colnames(dat1)[-1]
> res
> # V1V2
> #F "0%" "20%"
> #M "50%" "20%"
> A.K.
>
>
>
>
>
> - Original Mes
; From: rex2013 <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=4655274&i=0>>
>
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4655274&i=1>
> Cc:
> Sent: Friday, January 11, 2013 2:16 AM
> Subject: Re: [R] random effects mo
t.
Hope it helps.
A.K.
- Original Message -
From: rex2013
To: r-help@r-project.org
Cc:
Sent: Friday, January 11, 2013 2:16 AM
Subject: Re: [R] random effects model
Hi AK
Regarding the missing values, I would like to find out the patterns of
missing values in my data set. I know the overall
he same cluster with the values of the vector of
> k respectively l have
> a correlation of rkl ."
>
> Hope it helps.
> A.K.
>
>
>
>
> - Original Message -
> From: rex2013 <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=4654996&i=1&g
ues of the vector of k
respectively l have
a correlation of rkl ."
Hope it helps.
A.K.
- Original Message -
From: rex2013
To: r-help@r-project.org
Cc:
Sent: Tuesday, January 8, 2013 5:29 PM
Subject: Re: [R] random effects model
Hi
Thanks a lot, the corstr "exchangeable"does wo
> Have a look at
>
> http://stats.stackexchange.com/questions/21771/how-to-perform-model-selection-in-gee-in-r
> It's not clear to me "reference to write about missing values".
> A.K.
>
>
>
>
> - Original Message -
> From: Usha Gurunathan
>
-selection-in-gee-in-r
It's not clear to me "reference to write about missing values".
A.K.
- Original Message -
From: Usha Gurunathan
To: arun
Cc:
Sent: Monday, January 7, 2013 6:12 PM
Subject: Re: [R] random effects model
Hi AK
2)I shall try putting exch. and c
="ar1". Why do you gave the option "unstructured"?
A.K.
----- Original Message -
From: rex2013
To: r-help@r-project.org
Cc:
Sent: Monday, January 7, 2013 6:15 AM
Subject: Re: [R] random effects model
Hi A.K
Below is the comment I get, not sure why.
BP.sub3 i
55454
#age0 0.45322698
#age1 0.01187725
#smoke1 0.86262269
#age-1:smoke1 0.17239050
#age0:smoke1 0.32223942
#age1:smoke1 0.36686706
A.K.
- Original Message -
From: rex2013
To: r-help@r-project.org
Cc:
Sent: Monday, January 7, 2013 6:15 AM
Subject: Re: [R] random
me),]
> seiz.l$t <- ifelse(seiz.l$time == 0, 8, 2)
> seiz.l$x <- ifelse(seiz.l$time == 0, 0, 1)
> m1 <- geese(y ~ offset(log(t)) + x + trt + x:trt, id = id,
> data=seiz.l, corstr="exch", family=poisson)
> summary(m1)
>
> sum
0:4, direction="long")
seiz.l <- seiz.l[order(seiz.l$id, seiz.l$time),]
seiz.l$t <- ifelse(seiz.l$time == 0, 8, 2)
seiz.l$x <- ifelse(seiz.l$time == 0, 0, 1)
m1 <- geese(y ~ offset(log(t)) + x + trt + x:trt, id = id,
data=seiz.l, corstr="
Hi A.K
Regarding my question on comparing normal/ obese/overweight with blood
pressure change, I did finally as per the first suggestion of stacking the
data and creating a normal category . This only gives me a obese not obese
14, but when I did with the wide format hoping to get a
obese14,norm
30 matches
Mail list logo