gendist3e: Generate test distribution 3 with errors

Description Usage Arguments Value

View source: R/testdata.R

Description

This function generates a data set for testing purposes. There is a single instrument that takes on values of 1 or 2, and the distribution of the values for the binary instrument is uniform. The MTRs are m0 ~ 0 + u and m1 ~ 1 + u.

Usage

1
gendist3e(N = 100, subN = 0.5, p1 = 0.4, p2 = 0.6, v0.sd = 0.5, v1.sd = 0.75)

Arguments

N

integer, default set to 100. Total number of observations in the data.

subN

, default set to 0.5. This is the probability the agent will have Z = 1.

p1

the probability of treatment for those with the instrument Z = 1.

p2

the probability of treatment for those with the instrument Z = 2.

v0.sd

numeric, standard deviation of error term for counterfactual D = 0

v1.sd

numeric, standard deviation of error term for counterfactual D = 1

Value

a data.frame.


ivmte documentation built on Sept. 17, 2021, 5:06 p.m.