I am trying to use predictClass to estimate posterior classification after runnig a hlme growth mixture model. Although I have downloaded lcmm and everything runs smoothly until I use the predictClass function which is not found.
Any clues why is this the case?
you likely havent loaded the lcmm library before trying to use its functions
library(lcmm)
lcmm library is loaded and all the other lcmm-related function run without a problem.
can you run the following and report back
lcmm::predictClass
you should see
function (model, newdata, subject = NULL)
{
arguments <- as.list(model$call)
argfunction <- as.character(arguments[[1]])
etc.
I see the following:
Error: 'predictClass' is not an exported object from 'namespace:lcmm'
you might have a too early package version.
> packageVersion("lcmm")
[1] ‘2.0.0’
?
according to the news
Changes in Version 1.9.3 (2021-06-17):
- new functions predictClass, predictRE and summaryplot
Thanks that solved it!
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.