simpca function

Simulate Data with a Specific Principal Components Structure and Response Style Contamination

Simulate Data with a Specific Principal Components Structure and Response Style Contamination

Simulate normally distributed data with specific covariance structure and randomly sampled means. Adds response style contamination.

simpca(nr.indv = rep(200, 5), m = 10, q = 7, R = rcormat(m = m), err.coeff = 0.1, alphamat = rbind(c(0.5, 2, 4), c(10, 2, 10), c(1, 2, 1), c(4, 2, 0.5), c(0.1, 2, 0.1))[1:length(nr.indv), ], randomize = FALSE)

Arguments

  • nr.indv: Numeric vector of group sizes.
  • m: Integer; then number of variables to simulate.
  • q: Integer; the rating scale used 1:q.
  • R: List with entry named 'R' which is the simulated correlation matrix
  • err.coeff: Standard error for each variable, added unto R.
  • alphamat: Matrix containing splines coefficients for te construction of respone styles.
  • randomize: logical; should the rows of the data be randomly permuted or not?
  • Maintainer: Pieter Schoonees
  • License: GPL (>= 2)
  • Last published: 2016-01-05

Useful links