simulate_data {BINtools}R Documentation

Simulate Data

Description

This function allows the user to generate synthetic data of two groups (control and treatment) of forecasters making probability predictions of binary events. The function is mostly useful for testing and illustration purposes.

Usage

simulate_data(parameters, N, N_0, N_1, rho_o = 0)

Arguments

parameters

A list containing the true values of the parameters: mu_star,mu_0,mu_1,gamma_0,gamma_1,rho_0,delta_0,rho_1,delta_1 and rho_01

N

Number of events

N_0

Number of forecasters in the control group

N_1

Number of forecasters in the treatment group

rho_o

The level of dependence between event outcomes. (Default: the events are independent conditional on the model parameter values. This sets rho_ = 0.0)

Details

See complete_summary for a description of the model parameters. Not all combinations of parameters are possible. In particular, the covariance parameters gamma and rho are dependent on each other and must result in a positive semi-definite covariance matrix for the outcomes and predictions. To find a feasible set of parameters, we recommend users to experiment: begin with the desired levels of mu, gamma, and delta, and values of rho close to zero, and then increase rho until data can be generated without errors.

Value

List containing the simulated data. The elements of the list are as follows.

See Also

estimate_BIN, complete_summary

Examples


simulate_data(list(mu_star = -0.8,mu_0 = -0.5,mu_1 = 0.2,gamma_0 = 0.1,gamma_1 = 0.3,
rho_0 = 0.05,delta_0 = 0.1,rho_1 = 0.2, delta_1 = 0.3,rho_01 = 0.05), 300,100,100)




[Package BINtools version 0.1.0 Index]