[R] Random effects model with PLM: "System is computationally singular"-Error?

2014-03-15 Thread Millo Giovanni
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

[R] Random effects model with PLM: "System is computationally singular"-Error?

2014-03-14 Thread tahaus
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

Re: [R] random effects model

2013-01-18 Thread rex2013
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

Re: [R] random effects model

2013-01-16 Thread arun
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

Re: [R] random effects model

2013-01-16 Thread rex2013
.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:

Re: [R] random effects model

2013-01-15 Thread arun
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]]) >

Re: [R] random effects model

2013-01-15 Thread Usha Gurunathan
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

Re: [R] random effects model

2013-01-14 Thread arun
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[

Re: [R] random effects model

2013-01-14 Thread arun
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

Re: [R] random effects model

2013-01-14 Thread Usha Gurunathan
] # 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

Re: [R] random effects model

2013-01-14 Thread rex2013
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

Re: [R] random effects model

2013-01-13 Thread arun
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

Re: [R] random effects model

2013-01-13 Thread arun
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

Re: [R] random effects model

2013-01-12 Thread arun
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_

Re: [R] random effects model

2013-01-12 Thread Usha Gurunathan
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

Re: [R] random effects model

2013-01-12 Thread arun
68690096%" "23.3865814696486%" "23.3865814696486%" #Male   "25.814696485623%"  "29.1533546325879%" "29.1533546325879%" #   hibp14  hibp21 #Female "24.1693290734824%" "31.3418530351438%" #Male   &qu

Re: [R] random effects model

2013-01-12 Thread arun
(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

Re: [R] random effects model

2013-01-12 Thread arun
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

Re: [R] random effects model

2013-01-11 Thread Usha Gurunathan
(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

Re: [R] random effects model

2013-01-11 Thread rex2013
; 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

Re: [R] random effects model

2013-01-11 Thread arun
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

Re: [R] random effects model

2013-01-11 Thread rex2013
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

Re: [R] random effects model

2013-01-08 Thread arun
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

Re: [R] random effects model

2013-01-08 Thread rex2013
> 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 >

Re: [R] random effects model

2013-01-07 Thread arun
-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

Re: [R] random effects model

2013-01-07 Thread arun
="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

Re: [R] random effects model

2013-01-07 Thread arun
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

Re: [R] random effects model

2013-01-07 Thread rex2013
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

Re: [R] random effects model

2013-01-06 Thread arun
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="

Re: [R] random effects model

2013-01-06 Thread rex2013
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