genip.montecarlo: Generate Simulated Responses of Respondents with Ideal Points

Description Usage Arguments Value Author(s)

View source: R/genip.montecarlo.R

Description

Generate simulated responses of survey respondents with ideal points through Monte Carlo method.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
genip.montecarlo(
  n = 1200,
  q = 20,
  ncat = 5,
  ndim = 2,
  missing = 0.1,
  correlations.lim = c(-0.1, 0.7),
  utility.probs = c(0.33, 0.33, 0.33),
  error.respondents = c(0.1, 1),
  error.issues = c(2, 1),
  idealpoints.lim = c(-2, 2)
)

Arguments

n

Number of respondents.

q

Number of issues.

ncat

Number of ordered category in responses.

ndim

Number of dimentions in ideal points.

missing

Proportion of missing responses. Ranges from 0-1.

correlations.lim

Limits in the range of correlation between respondents and issues. Higher value indicates stronger association between respondent's values and their ideal points in the issue.

utility.probs

Utility function is selected randomly from three options – "linear","normal","quadratic". This argument defines sampling weights for utility functions.

error.respondents

The lower and upper limits of uniform distribution that are used to initiate values of respondents.

error.issues

The shape and rate parameter in rgamma distribution, respectively. Used to set initial values of issue positions.

idealpoints.lim

Limits in the range of ideal points. The values outside of this range is recoded into minimum and maximum value of the range.

Value

A list with the following elements

Author(s)

Tzu-Ping Liu jamesliu0222@gmail.com, Gento Kato gento.badger@gmail.com, and Sam Fuller sjfuller@ucdavis.edu.


gentok/ipbridging documentation built on March 29, 2020, 3:06 a.m.