Learn R Programming

MSIMST (version 1.1)

reg_simulation1: The Function for the Simulation Study without the Variable Selection

Description

This is a simply simulation study that is designed to demonstrate the correctness of the proposed Gibbs sampler, Gibbs_Sampler().

Usage

reg_simulation1(N, ni_lambda, beta, beta_b, dsq, sigmasq, delta, nu)

Value

A simulated dataset with the response variable y and the design matrix X.

Arguments

N

The number of subjects.

ni_lambda

The mean of Poisson distribution.

beta

A 3 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.

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").

Examples

Run this code
set.seed(100)
simulated_data <- reg_simulation1(N = 50,
                                  ni_lambda = 8,
                                  beta = c(0.5,0.5,0.5),
                                  beta_b = 1.5,
                                  dsq = 0.1,
                                  sigmasq = 0.5,
                                  delta = 0.6,
                                  nu = 5.89)
y <- simulated_data$y
X <- simulated_data$X
print(head(y))
print(head(X))

Run the code above in your browser using DataLab