wprifm: Within-Person Random Intercept Factor Model

Description Usage Arguments Details Value References Examples

Description

Within-Person Random Intercept Factor Model

Usage

1
wprifm(data, scale = FALSE, save_model = FALSE)

Arguments

data

Data.frame containing the manifest variables.

scale

Should the data be scaled? Default = FALSE

save_model

Should the temporary lavaan model syntax be saved. Default = FALSE

Details

This function performs the within-person random intercept factor model described in Davison, Kim, and Close (2009). For information about this model, please see this reference. This function returns an object of lavaan class and thus any generics defined for lavaan will work on this object. This function provides a simple wrapper for lavaan.

Value

an object of class lavaan

References

Davison, M., Kim, S.-K., Close, C. (2009). Factor analytic modeling of within person variation in score profiles. Multivariate Behavioral Research, 44(5), 668 - 687. DOI: 10.1080/00273170903187665

Examples

1
2
data <- HolzingerSwineford1939[,7:ncol(HolzingerSwineford1939)]
wprifm(data, scale = TRUE)

Example output

Loading required package: ggplot2
Loading required package: RColorBrewer
Loading required package: reshape
Loading required package: lavaan
This is lavaan 0.6-3
lavaan is BETA software! Please report any bugs.
lavaan 0.6-3 ended normally after 21 iterations

  Optimization method                           NLMINB
  Number of free parameters                         20
  Number of equality constraints                     1

  Number of observations                           301

  Estimator                                         ML
  Model Fit Test Statistic                     158.922
  Degrees of freedom                                26
  P-value (Chi-square)                           0.000

profileR documentation built on May 2, 2019, 8:31 a.m.