Description Usage Arguments Value Methods (by class) Author(s) Examples
View source: R/estimate-profiles.R
Get data from objects generated by tidyLPA.
1 2 3 4 5 6 7 |
x |
An object generated by tidyLPA. |
... |
further arguments to be passed to or from other methods. They are ignored in this function. |
If one model is fit, the data is returned in wide format as a tibble. If more than one model is fit, the data is returned in long form. See the examples.
tidyLPA
: Get data for a latent profile analysis with multiple
numbers of classes and models, of class 'tidyLPA'.
tidyProfile
: Get data for a single latent profile analysis object,
of class 'tidyProfile'.
Caspar J. van Lissa
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
if(interactive()){
library(dplyr)
# the data is returned in wide form
results <- iris %>%
select(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) %>%
estimate_profiles(3)
get_data(results)
# note that if more than one model is fit, the data is returned in long form
results1 <- iris %>%
select(Sepal.Length, Sepal.Width, Petal.Length, Petal.Width) %>%
estimate_profiles(c(3, 4))
get_data(results1)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.