I am a new R user and am trying to run a latent profile analysis using the tidyLPA package. All of the variables selected are ordinal with integer values from 1-11. Missing values have already been imputed.
First 10 rows of data:
RISK1_PHMS1 RISK1_PHMS4 RISK1_PHMS6 RISK1_PHMS8 RISK1_PHMS18 RISK1_PHMS20 RISK_PHMS_SEVERITY2
1 8 5 8 9 8 8 6
2 8 4 11 6 8 10 5
3 9 9 8 9 8 9 8
4 5 6 6 3 7 6 7
5 8 9 11 6 8 8 9
6 5 5 7 8 7 7 5
7 8 3 11 4 11 4 1
8 9 3 11 4 9 9 5
9 8 10 6 11 10 10 3
10 11 3 10 6 8 6 6
m1 <- msps1 %>%
select (RISK1_PHMS1, RISK1_PHMS4, RISK1_PHMS6, RISK1_PHMS8, RISK1_PHMS18, RISK1_PHMS20,
RISK_PHMS_SEVERITY2) %>%
estimate_profiles(1:5, variances="varying", covariances="varying")
Error message received is:
Error in estimate_profiles(., 1:5, variances = "varying", covariances = "varying") :
could not find function "estimate_profiles"
Can someone help me figure out why I'm receiving this error message?
Thanks,
Jennifer