reg_simulation3 {MSIMST} | R Documentation |
The Function for the Simulation Study with the Variable Selection and Survey Weights
Description
This simulation study is designed to show the effectiveness of the grouped horseshoe prior for the variable selection and the WFPBB()
function for adjusting survey weights.
Usage
reg_simulation3(
N,
ni_lambda,
beta,
beta_b,
dsq,
sigmasq,
delta,
nu,
muz,
rho,
sigmasq_z,
zeta0,
zeta1
)
Arguments
N |
The number of subjects. |
ni_lambda |
The mean of Poisson distribution. |
beta |
The covariates' coefficients. A 10 by 1 vector. |
beta_b |
The slope of PD response. |
dsq |
A part of covariance parameter. |
sigmasq |
A part of covariance parameter. |
delta |
The skewness parameter. |
nu |
The degree of freedom. |
muz |
The location parameter of the latent/selection variable. |
rho |
The correlation parameter of the latent/selection variable. |
sigmasq_z |
The variance parameter of the latent/selection variable. |
zeta0 |
The intercept term inside the logistic function. |
zeta1 |
The slope term inside the logistic function. |
Details
More details of the design of this simulation study can be found in the vignette. Users can access the vignette by the command vignette(package = "MSIMST")
.
Value
A simulated dataset with the response variable y
, the design matrix X
and the survey weight survey_weight
.
Examples
set.seed(100)
output_data <- reg_simulation3(N = 1000,
ni_lambda= 8,
beta = c(rep(1,6),rep(0,4)),
beta_b = 1.5,
dsq = 0.1,
sigmasq = 0.5,
delta = 0.6,
nu = 5.89,
muz = 0,
rho = 36.0,
sigmasq_z = 0.6,
zeta0 = -1.8,
zeta1 = 0.1)
y <- output_data$y
X <- output_data$X
survey_weight <- output_data$survey_weight