Description Usage Arguments Details Value
The function allows to simulate data for a truncated dataset with truncation based on the outcome of two decisions and unobservables. The function allows to specify three tests to detect complementarity between the decisions.
1 2 3 4 |
obs |
A single numeric value or a list with the number of observations in the simulated dataset. |
rate |
A single numeric value or a list with the survival rate. This should be a number between 0 and 1. The closer to 0 the stronger the pressure to be optimal. |
sd |
A single numeric value or a list with the standard deviation of
noise term of the performance. A higher |
d |
A vector with two numeric values or a list of vectors. The quadratic effect of the two decisions that captures their the diminishing returns. |
nsim |
The number of simulations. |
family_method |
A single string or list of strings with the family and
method of the tests to be run. Defaults to |
seed |
The seed can be set for reproducibility. |
mc_cores |
The number of cores to be used when running different simulations on different cores. That means that the core unit for parallelizing is a simulation. |
b |
A vector with four numeric values or a list of vectors. The
contribution to performance of the two decisions of interest. A four
element vector for the intercept, |
This function allows to simulate data of the form
y ~ N(β_0 + β_1 x_1 + β_2 x_2 + β_3 x_1 x_2 - δ_1 {x_1}^2 - δ_2 {x_2}^2, σ)
.
The parameters β, δ, and σ can be set as parameters in the function. The simulated data are truncated based on the outcome y to simulate optimization by decision makers. The rate of survival determines the extent of truncation and thus the strenght of the optimazation.
The function allows to specify three different tests for the complementarity of x_1 and x_2. The first family of tests ignores the optimization and runs a regression according to the equation above. Traditionally, the quadratic terms are ignored. The augmented method allow for the inclusion of the quadratic terms. The second family of tests assumes optimal choices. As a result,
2 delta_1 x_1 = β_1 + beta_3 x_2
Typically, this matching approach does not estimate the δ_1 parameter. All tests can be done from this function directly. The function returns a single dataset for every test and parameter combination.
A dataframe with test statistics and the parameters for each simulation and test.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.