genPCA: Generate PCA data and Calculates Correlation Matrices

Description Usage Arguments Value Author(s)

View source: R/genPCA.R

Description

Generate a response style data set from a specific correlation matrix, clean the data with constrained dual scaling and report the original, cleaned and contaminated correlation matrices in a list.

Usage

1
2
3
genPCA(nr.indv = rep(100, 5), m = 10, q = 7, r = 3, 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 = TRUE, ...)

Arguments

nr.indv

Vector; number of individuals in each response style group. It is passed to simpca.

m

scalar; Number of items.

q

scalar; Number of rating categories, such that the rating scale is 1:q.

r

scalar; Rank of simulated correlation matrices.

err.coeff

scalar; Standard deviation used in simulations that is passed on to simpca.

alphamat

matrix; Contains the spline parameters for the different response styles that is passed to simpca.

randomize

logical; See simpca.

...

Arguments passed to cds.

Value

A list with components:

Rsim

Correlation matrix from which the sample was generated

Rclean

Correlation matrix for the cleaned data

Rcont

Correlation matrix for the contaminated data

Author(s)

Pieter C. Schoonees


cds documentation built on May 2, 2019, 5:54 a.m.