Skip to content

help with reshaping wide to long format

1 message · arun

#
HI Usha,

For your first question (saw ur posting in Nabble).
I subset the data on the reshaped long format data which has time variable.? Please check my previous email.
BP.stacknormal<-subset(BP.stack3,Obese==0 & Overweight==0) 
???????????????????????????????????????? ^^^^^^^
The variable "Categ" was created to identify the levels "Normal", "Obese" in the reshaped data.? You should also create "Overweight" just like I created the others and rbind the three subsets.
I would do mixed effects model with all the three "Normal", "Obese", "Overweight" in the same model as you wanted random effects in the model.? Regarding the mixed effects model, it would be good to post the question in R mixed models (r-sig-mixed-models at r-project.org) mailing group as it specifically deals with this kind of problems.? I can't say whether nlme or lme4 is better in this case.? You could fit the model with several other variables and select the best model based on different criteria. 
Happy New Year!
A.K.
?