Error in undefined Columns

Hello all,

I am new to RStudio and have a problem when loading the package 'lcmm' from my data.
This is the following code I am using:
'
library(lcmm)
dat = baseline4_0
lcmm11 <- lcmm(K1 ~ poly(year, degree = 1, raw = TRUE), random =~ year,
subject = 'nsin', data = dat, ng = 1, link = 'linear')
'

No matter what I do, I keep getting the error:
Error in [.data.frame(newdata, , nom.subject) :
undefined columns selected

Thanks in advance for your help.

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.