Skip to contents

Creates a comprehensive configuration list with all parameters needed for running Lewbel (2012) Monte Carlo simulations.

Usage

create_default_config(
  num_simulations = .hetid_const("DEFAULT_NUM_SIMULATIONS"),
  main_sample_size = .hetid_const("DEFAULT_MAIN_SAMPLE_SIZE"),
  sample_sizes = .hetid_const("DEFAULT_SAMPLE_SIZES"),
  delta_het = 0.8,
  delta_het_values = c(0.4, 0.8, 1.2),
  n_reps_by_n = .hetid_const("DEFAULT_BOOTSTRAP_REPS"),
  n_reps_by_delta = .hetid_const("DEFAULT_BOOTSTRAP_REPS"),
  bootstrap_reps = .hetid_const("DEFAULT_BOOTSTRAP_REPS"),
  bootstrap_subset_size = .hetid_const("DEFAULT_BOOTSTRAP_SUBSET_SIZE"),
  bootstrap_demo_size = .hetid_const("DEFAULT_BOOTSTRAP_DEMO_SIZE"),
  beta1_0 = 0.5,
  beta1_1 = 1.5,
  gamma1 = -0.8,
  beta2_0 = 1,
  beta2_1 = -1,
  alpha1 = -0.5,
  alpha2 = 1,
  tau_set_id = 0.2,
  endog_var_name = "Y2",
  exog_var_names = "Xk",
  df_adjust = "asymptotic"
)

Arguments

num_simulations

Integer. Number of main simulation runs (default: 1000).

main_sample_size

Integer. Primary sample size for main results (default: 1000).

sample_sizes

Integer vector. Sample sizes for consistency analysis (default: c(500, 1000, 2000)).

delta_het

Numeric. Heteroscedasticity strength parameter (default: 1.2).

delta_het_values

Numeric vector. Delta values for sensitivity analysis (default: c(0.4, 0.8, 1.2)).

n_reps_by_n

Integer. Replications per sample size (default: 100).

n_reps_by_delta

Integer. Replications per delta value (default: 100).

bootstrap_reps

Integer. Number of bootstrap replications (default: 100).

bootstrap_subset_size

Integer. Size of bootstrap subset (default: 10).

bootstrap_demo_size

Integer. Size of bootstrap demo (default: 5).

beta1_0

Numeric. Intercept for first equation (default: 0.5).

beta1_1

Numeric. Slope for first equation (default: 1.5).

gamma1

Numeric. True value of the endogenous parameter (default: -0.8).

beta2_0

Numeric. Intercept for second equation (default: 1.0).

beta2_1

Numeric. Slope for second equation (default: -1.0).

alpha1

Numeric. Factor loading for first error (default: -0.5).

alpha2

Numeric. Factor loading for second error (default: 1.0).

tau_set_id

Numeric. Tau parameter for set identification (default: 0.2).

endog_var_name

Character. Name of endogenous variable (default: "Y2").

exog_var_names

Character. Name of exogenous variable (default: "Xk").

df_adjust

Character. Degrees of freedom adjustment method (default: "asymptotic"). Options: "asymptotic", "finite".

Value

A list containing all configuration parameters.

Examples

if (FALSE) { # \dontrun{
config <- create_default_config()
config$gamma1 # -0.8

# Custom configuration
custom_config <- create_default_config(
  num_simulations = 500,
  gamma1 = -0.5
)
} # }