LCTMtools
LCTMtools copied to clipboard
Error in residualplot_step1
Dear hlennon! hello, when I use the function "residualplot_step1", and run follow codes:
set.seed(100)
library(lcmm)
model2classes <- lcmm::hlme(fixed = bmi ~ age + I(age^2),
mixture= ~ age,
random = ~ age,
ng = 2,
nwg = TRUE,
subject = "id",
data = data.frame(bmi_long[1:500, ]) )
residualplot_step1(model2classes,
- nameofoutcome = "bmi",
- nameofage = "age",
- data = bmi_long,
- )
The warning in screen is: Joining, by = "id" Joining, by = c("id", "bmi") Error in aes(x = get(nameofage), y = Residuals, group = class) : 没有"aes"这个函数
and here is my R version information:
R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 0.5
year 2021
month 03
day 31
svn rev 80133
language R
version.string R version 4.0.5 (2021-03-31)
nickname Shake and Throw
Thanks!