Estimate_profiles not passing to plot_profiles

87 views
Skip to first unread message

Mac Murphy

unread,
Feb 4, 2022, 12:22:24 AM2/4/22
to tidyLPA
Hi all,

Just started using tidyLPA and loving how much it can do. I'm trying to plot the profiles that I generated, which seem correct and output as normal, but am getting an error (all below). I also didn't see anything called "df_plot" when looking into my generated tidyLPA. Any advice on what I'm doing wrong?

Thanks!
Mac

Data %>%
  select(JOMO_total, lonely_t, sm_act_t) %>%
  scale() %>%
  estimate_profiles(4, package="mclust") %>%
  plot_profiles()

Error in UseMethod("droplevels") :
  no applicable method for 'droplevels' applied to an object of class "NULL"

Loui S

unread,
Jul 15, 2022, 11:43:43 PM7/15/22
to tidyLPA
Hey when I'm plotting my profiles I use this code:

plot_profiles(mydata, sd= FALSE, add_line = TRUE, bw= FALSE, rawdata = FALSE )

"my data" being the name of whatever I've saved the LPA solution I want to plot as.

Don't know enough to comment on your code but I hope this helps, has always plotted things for me.

PS: I have the following packages loaded:

library(tidyverse)
library(here)
library(dplyr)
library(kableExtra)
library(tidyLPA)
library(mclust)
library(rio)
library(dplyr)
library(foreign)
library(openxlsx)
Reply all
Reply to author
Forward
0 new messages