data_simulation {DNNSIM} | R Documentation |
Simulate data for the DNN-SIM model
Description
Simulate data for the DNN-SIM model
Usage
data_simulation(n, beta, w, sigma, delta, seed)
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.
Value
a dataframe of the simulated response variable y and the design matrix X.
References
Liu Q, Huang X, Bai R (2024). “Bayesian Modal Regression Based on Mixture Distributions.” Computational Statistics & Data Analysis, 108012. doi:10.1016/j.csda.2024.108012.
Examples
# 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))
}