Modle for the outcome for the mass imputation estimator
+Usage
+model_glm(
+ y_nons,
+ X_nons,
+ X_rand,
+ weights,
+ svydesign,
+ family_outcome,
+ start_outcome,
+ vars_selection,
+ pop_totals,
+ pop_size,
+ control_outcome,
+ verbose,
+ se
+)
Arguments
+ + +- y_nons +
target variable from non-probability sample
+
+
+- X_nons +
a
model.matrix
with auxiliary variables from non-probability sample
+
+
+- X_rand +
a
model.matrix
with auxiliary variables from non-probability sample
+
+
+- weights +
case / frequency weights from non-probability sample
+
+
+- svydesign +
a svydesign object
+
+
+- family_outcome +
family for the glm model
+
+
+- start_outcome +
start parameters
+
+
+- vars_selection +
whether variable selection should be conducted
+
+
+- pop_totals +
population totals from the
nonprob
function
+
+
+- pop_size +
population size from the
nonprob
function
+
+
+- control_outcome +
controls passed by the
control_out
function
+
+
+- verbose +
parameter passed from the main
nonprob
function
+
+
+- se +
whether standard errors should be calculated
+
+
Value
+an nonprob_model
class which is a list
with the following entries
- model_fitted +
fitted model either an
glm.fit
orcv.ncvreg
object
+
+- y_nons_pred +
predicted values for the non-probablity sample
+
+- y_rand_pred +
predicted values for the probability sample or population totals
+
+- coefficients +
coefficients for the model (if available)
+
+- svydesign +
an updated
surveydesign2
object (new columny_hat_MI
is added)
+
+- y_mi_hat +
estimated population mean for the target variable
+
+- vars_selection +
whether variable selection was performed
+
+- var_prob +
variance for the probability sample component (if available)
+
+- var_nonprob +
variance for the non-probability sampl component
+
+- model +
model type (character
"glm"
)
+
+
+