Re: [R] random effects model

2013-01-15 Thread Usha Gurunathan
erweight'") > > library(ggplot2) > ggplot(BP.stack3,aes(x=factor(HiBP),fill=Obese))+geom_bar(position="fill") > > ggplot(BP.stack3,aes(x=factor(HiBP),fill=Overweight))+geom_bar(position="fill") > > You could try lmer() from lme4. > library(lme4) &g

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-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-11 Thread Usha Gurunathan
, arun kirshna [via R] > > <[hidden email] <http://user/SendEmail.jtp?type=node&node=4654996&i=3>> > > wrote: > > > > > > > > > > > HI, > > > BP.stack5 is the one without missing values. > > > na.omit(). Otherwise, I have to use the option na.acti