fit_model {NRejections} | R Documentation |
Fit OLS model for a single outcome
Description
The user does not need to call this function. Fits OLS model for a single outcome with or without centering the test statistics to enforce the global null.
Usage
fit_model(
X,
C = NA,
Y,
Ys,
d,
center.stats = FALSE,
bhat.orig = NA,
alpha = 0.05
)
Arguments
X |
Single quoted name of covariate of interest |
C |
Vector of quoted covariate names |
Y |
Quoted name of single outcome for which model should be fit |
Ys |
Vector of all quoted outcome names |
d |
Dataframe |
center.stats |
Should test statistics be centered by original-sample estimates to enforce global null? |
bhat.orig |
Estimated coefficients for covariate of interest in original sample (W-vector). Can be left NA for non-centered stats. |
alpha |
Alpha level for individual tests |
Examples
data(attitude)
fit_model( X = "complaints",
C = c("privileges", "learning"),
Y = "rating",
Ys = c("rating", "raises"),
d = attitude,
center.stats = FALSE,
bhat.orig = NA,
alpha = 0.05 )
[Package NRejections version 1.2.0 Index]