spec.data.all: Data Generation for All Specifications

View source: R/MCres_comb.R

spec.data.allR Documentation

Data Generation for All Specifications

Description

Generates running variables, and corresponding standard deviations and regression function values for all specifications.

Usage

spec.data.all(spec.all, which.fun, n, th, C.big, C.small, sig.scale, seed = 1)

Arguments

spec.all

data.frame object created by spec.grid function.

which.fun

which regression function to evaluate; supports 1:6.

n

sample size.

th

true RD parameter.

C.big

the value of C corresponding to the large C.

C.small

the value of C corresponding to the small C.

sig.scale

scaling parameter for the standard deviation.

seed

the random number seed used to generate regressors; the default is seed = 1.

Value

a list with nrow(spec.all) components, where each of them contains data corresponding to each specification.

Examples

spec.all <- spec.grid(c("unif", "homo", "trueCsmall"))
spec.data.all(spec.all, 4, 100, 1, 3, 1, 1/2)
spec.data.all(spec.all, 5, 100, 1, 3, 1, 1/2)

koohyun-kwon/rdadapt documentation built on May 8, 2022, 8:49 p.m.