Learn R Programming

SimCorMultRes (version 1.4.0)

rmult.crm: Simulating Correlated Ordinal Multinomial Responses under a Marginal Continuation Ratio Model

Description

Simulates correlated ordinal multinomial responses assuming that a continuation ratio model holds for the marginal probabilities.

Usage

rmult.crm(clsize, lin.pred, cor.matrix, intercepts, link = "probit")

Arguments

clsize
integer indicating the common cluster size.
lin.pred
matrix with clsize columns. See details for more info.
cor.matrix
matrix indicating the correlation matrix of the multivariate normal distribution in the NORTA method.
intercepts
numerical vector or matrix containing the intercepts of the marginal continuation ratio model. See details for more info.
link
character string indicating the link function of the continuation ratio model. Options include "probit", "logit", "cloglog" or "cauchit".

Value

  • Ysimthe correlated ordinal multinomial responses. Element ($i$,$t$) represents the realization of $Y_{it}$.
  • correlationthe correlation matrix of the multivariate normal distribution in the NORTA method.
  • rlatentthe latent random vectors.

Details

The assumed marginal cumulative link model is $$Pr(Y_{it}=j |Y_{it} \ge j,x_{it})=F(\beta_{t0j} +\beta^{'}_{t} x_{it})$$ where $F$ is the cumulative distribution function determined by link. For subject $i$, $Y_{it}$ is the $t$-th multinomial response and $x_{it}$ is the associated covariates vector. Finally, $\beta_{t0j}$ is the $j$-th category specific intercept and $\beta^{'}_{t}$ is the regression parameter vector corresponding to the $t$-th measurement occasion. The multinomial responses $Y_{it}$ are determined by extending the latent variable threshold approach of Tutz (1991) to the correlated latent continuous variables. See vignette for more info. The sample is equal to the number of rows in lin.pred. Row $i$ corresponds to subject $i$. The ($i,t$)-th element of lin.pred equals $\beta^{'}_{t} x_{it}$. When $\beta_{0tj}=\beta_{0j}$ for all $t$, then intercepts should be provided as a numerical vector. Otherwise, intercepts must be a numerical matrix such that $t$ contains the category specific intercepts at the $t$-th measurement occasion.

References

Cario, M. C. and Nelson, B. L. (1997) Modeling and generating random vectors with arbitrary marginal distributions and correlation matrix. Technical Report, Department of Industrial Engineering and Management Sciences, Northwestern University, Evanston, Illinois. Li, S. T. and Hammond, J. L. (1975) Generation of pseudorandom numbers with specified univariate distributions and correlation coefficients. IEEE Transacions on Systems, Man and Cybernetics, 5, 557--561. Tutz, G. (1991) Sequential models in categorical regression. Computational Statistics & Data Analysis, 11, 275--295.

See Also

For simulating correlated ordinal multinomial responses see also rmult.clm. For simulating correlated nominal multinomial responses use rmult.bcl, and for simulating correlated binary responses use rbin.

Examples

Run this code
## See vignette for more details about the sampling scheme.
set.seed(1)
N <- 500
clsize <- 4
intercepts <- c(-1.5, -0.5, 0.5, 1.5)
cor.matrix <- diag(1, 16)
x <- rnorm(N)
lin.pred <- matrix(rep(x,clsize), N, clsize, byrow=TRUE)
Y <- rmult.crm(clsize, lin.pred, cor.matrix, intercepts, link="probit")

Run the code above in your browser using DataLab