cds.sim {cds}R Documentation

Grouped Simulation with Response Styles

Description

Simulate response data for a group of response styles.

Usage

cds.sim(nr.indv = c(100, 100, 100), m = 25, scales = 1:7,
  err.coeff = 0.1, alphamat = rbind(c(4, 4, 1), c(1, 4, 4), c(1, 2, 1)),
  true.mu = NULL, random = TRUE, same.mu = TRUE, use.copula = FALSE,
  reverse.thresh = 1)

Arguments

nr.indv

A vector giving the number of respondents in each group.

m

The number of objects.

scales

The rating scale used, 1:q.

err.coeff

The standard error used in the underlying normal noise.

alphamat

The matrix of spline parameters defining the response styles, with each row containing a response style. No intercepts should be included.

true.mu

Optional; a matrix or vector giving the true underlying preferences for the objects.

random

Logical indicating whether to apply the response styles in random order

same.mu

Logical indicating whether a universal value for mu should be assumed.

use.copula

Logical indicating whether to use a correlated dependence structure through a copula.

reverse.thresh

A numeric value giving the proportion of observations for which the dependece structure should be reversed. Only applicable when copula is TRUE.

Value

An object of class cdsdata, inheriting from class icdsdata, which is a list with the following slots:

prers

The pre-response style simulated data

postrs

The data after adding the response styles

postbl

The same as postrs in this case

Fr.cent.rs

The centred Fr matrix for postrs

Fr.rs

The Fr matrix for postrs

Fr.cent.bl

The same as Fr.cent.rs, for compatibility with icds

Fr.bl

The same as Fr.rs, for compatibility with icds

mu

Matrix of the true underlying preference structure for the obects

block

Numeric vector identifying the different blocks for incompleteness, in this case a vector of ones

grp.rs

The response style grouping vector

alphamat

Matrix of spline parameters for the response styles

scales

The rating scale 1:q used

m

Number of objects

munique

The number of objects seen within each block - equal to zero in this case

m0

The number of objects seen by all subjects - equal to m in this case

true.tau

Actual tau used in the simulation with copulae

call

The function call

See Also

createcdsdata


[Package cds version 1.0.3 Index]