Closed crtahlin closed 10 years ago
The formula gets constructed as:
formula <- as.formula(paste(symptom, "~", as.factor(measurementVar),"+", groupingVar, "+(1|", subjectIDVar, ")"))
And the result is (for one concrete symptom case):
Fatigue ~ Measurement + Sex + (1 | PersonID)
Which if of probably not OK, since only one coefficient is output for Measurement
as a result. The as.factor()
should be used on the data frame, will try that...
Coeficients are now calculated for each measurement level above first one (first level used as reference), and can be reached via (perhaps a better way exist):
coef(model)$PersonID[["Measurement14"]][1]
Now just to figure out how to package them in a table.
This is the better way to reach the coefficients:
summary(model)$coef
Implemented, closing.
Output coefficients for each of the levels