Learn R Programming

effectFusion (version 1.1.3)

sim1: Simulated data set 1

Description

The simulated data set sim1 illustrates a setting with 500 observations from a linear regression model with normal response, 4 ordinal and 4 nominal predictors. Two regressors have 8 and two have 4 categories for each type of covariate (ordinal and nominal). Regression effects are set to \(\beta_1 = (0, 1, 1, 2, 2, 4, 4)\) and \(\beta_3 = (0, -2, -2)\) for the ordinal and \(\beta_5 = (0, 1, 1, 1, 1, -2, -2)\) and \(\beta_7 = (0, 2, 2)\) for the nominal covariates, and \(\beta_h = 0\) for h = 2, 4, 6, 8. Levels of the predictors are generated with probabilities \(\pi_h = (0.1, 0.1, 0.2, 0.05, 0.2, 0.1, 0.2, 0.05)\) and \(\pi_h = (0.1, 0.4, 0.2, 0.3)\) for regressors with 8 and 4 levels, respectively. For more details on the simulation setting see Pauger and Wagner (2019).

Usage

data(sim1)

Arguments

Format

A named list containing the following four variables:

y

vector with 500 observations of a normal response variable

X

matrix with 8 categorical predictors

beta

vector with coefficients used for data generation

types

character vector with types of covariates, 'o' for ordinal and 'n' for nominal covariates

References

Pauger, D., and Wagner, H. (2019). Bayesian Effect Fusion for Categorical Predictors. Bayesian Analysis, 14(2), 341-369. 10.1214/18-BA1096

See Also

effectFusion