outcome: The name of the outcome variable (must be present in the data frame).
treatment: The name of the treatment variable (must be present in the data frame).
control: Control variables to be added to the intermediate regression.
other_regressors: Subset of control variables to be added in the short regression (default is NULL).
Returns
A data frame with the following columns: - beta0: Treatment effect in the short regression
R0: R-squared in the short regression
betatilde: Treatment effect in the intermediate regression
Rtilde: R-squared in the intermediate regression
sigmay: Standard deviation of outcome variable
sigmax: Standard deviation of treatment variable
taux: Standard deviation of residual in auxiliary regression
Examples
## Load data setdata("NLSY_IQ")## Set age and race as factor variablesNLSY_IQ$age <- factor(NLSY_IQ$age)NLSY_IQ$race <- factor(NLSY_IQ$race)## Collect parameters from the short, intermediate and auxiliary regressionsparameters <- collect_par(data = NLSY_IQ, outcome ="iq_std",treatment ="BF_months",control = c("age","sex","income","motherAge","motherEDU","mom_married","race"),other_regressors = c("sex","age"))## See results(parameters)