Description Usage Arguments Details Value References See Also Examples
This method estimates the linear or quadratic parameters of the ADRF by estimating a leastsquares fit on the basis functions which are composed of combinations of the covariates and treatment values.
1 2 3 4 5 6 7 8 9 
Y 
is the the name of the outcome variable contained in 
treat 
is the name of the treatment variable contained in

covar_formula 
is the formula to describe the covariates needed
to estimate the constant term:

covar_lin_formula 
is the formula to describe the covariates needed
to estimate the linear term, t:

covar_sq_formula 
is the formula to describe the covariates needed
to estimate the quadratic term, t^2:

data 
is a dataframe containing 
degree 
is 1 for linear and 2 for quadratic outcome model. 
wt 
is weight used in lsfit for outcome regression. Default is wt = NULL. 
method 
is "same" if the same set of covariates are used to estimate the constant, linear, and/or quadratic term. If method = "different", then different sets of covariates can be used to estimate the constant, linear, and/or quadratic term. covar_lin_formula and covar_sq_formula must be specified if method = "different". 
This function estimates the ADRF by the method described in Schafer and Galagate (2015) that fits an outcome model using a function of the covariates.
reg_est
returns an object of class "causaldrf_lsfit",
a list that contains the following components:
param 
the estimated parameters. 
out_mod 
the result of the outcome model fit using lsfit. 
call 
the matched call. 
Schafer, J.L., Galagate, D.L. (2015). Causal inference with a continuous treatment and outcome: alternative estimators for parametric doseresponse models. Manuscript in preparation.
Schafer, Joseph L, Kang, Joseph (2008). Average causal effects from nonrandomized studies: a practical guide and simulated example. Psychological methods, 13.4, 279.
iptw_est
, ismw_est
,
aipwee_est
, wtrg_est
,
etc. for other estimates.
t_mod
, overlap_fun
to prepare the data
for use in the different estimates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  ## Example from Schafer (2015).
example_data < sim_data
reg_list < reg_est(Y = Y,
treat = T,
covar_formula = ~ B.1 + B.2 + B.3 + B.4 + B.5 + B.6 + B.7 + B.8,
covar_lin_formula = ~ 1,
covar_sq_formula = ~ 1,
data = example_data,
degree = 1,
wt = NULL,
method = "same")
sample_index < sample(1:1000, 100)
plot(example_data$T[sample_index],
example_data$Y[sample_index],
xlab = "T",
ylab = "Y",
main = "regression estimate")
abline(reg_list$param[1],
reg_list$param[2],
lty = 2,
col = "blue",
lwd = 2)
legend('bottomright',
"regression estimate",
lty = 2,
bty = 'Y',
cex = 1,
col = "blue",
lwd = 2)
rm(example_data, reg_list, sample_index)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.