Learn R Programming

DNNSIM (version 0.1.1)

data_simulation: Simulate data for the DNN-SIM model

Description

Simulate data for the DNN-SIM model

Usage

data_simulation(n, beta, w, sigma, delta, seed)

Value

a dataframe of the simulated response variable y and the design matrix X.

Arguments

n

an integer. The sample size.

beta

a vector. The covariate coefficients.

w

a number between 0 and 1. The skewness parameter.

sigma

a number larger than 0. The standard deviation parameter.

delta

a number larger than 0. The degree of freedom parameter.

seed

an integer. The random seed.

Details

This is a simple data generation function for a simulation study. All elements of the design matrix X follow a uniform distribution from -3.0 and 3.0 independently and identically. The true \(g\) function is the standard logistic function.

References

liu2022bayesianDNNSIM

Examples

Run this code

# \donttest{
# check python module dependencies
if (reticulate::py_module_available("torch") &
    reticulate::py_module_available("numpy") &
    reticulate::py_module_available("sklearn") &
    reticulate::py_module_available("scipy")) {
  df1 <- data_simulation(n=50,beta=c(1,1,1),w=0.3,
                         sigma=0.1,delta=4.0,seed=100)
  print(head(df1))
}
# }

Run the code above in your browser using DataLab