Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plot_density result is blank #194

Open
tchau30 opened this issue Apr 25, 2022 · 0 comments
Open

plot_density result is blank #194

tchau30 opened this issue Apr 25, 2022 · 0 comments

Comments

@tchau30
Copy link

tchau30 commented Apr 25, 2022

Hi,

I am very new to R so please forgive me if this is a silly question. I have successfully run estimate_profiles and plot_profiles on my data which consists of two continuous numeric variables (confirmed using is.numeric() and is.factor()). There are four unique datasets in total, corresponding to 4 different age groups' responses for variable A and variable B. However, running plot_density only produces a density plot for variable B but not variable A across all four datasets.

When I created a separate dataframe consisting of variable A alone, plot_density works perfectly.

Here is an example of the code I've been using:

lpa_test %>%
estimate_profiles(n_profiles = 3, models = 2) %>%
plot_density()

Or

lpa_test <- estimate_profiles(dataframe, n_profiles = 3, models = 2)
plot_density(lpa_test)

I've attached two images, one from the dataframe consisting of variable A alone, then another from a dataframe consisting of both variable A and variable B.

Thank you for your help,

Tracey
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant