An R6 class that stores results for a contrast of the form
\(L \theta - m\) estimated using a specified object inheriting from
FamModelFit. Wald tests and confidence intervals for individual
rows of the contrast matrix as well as an overall Wald chi-square test of
the null hypothesis \(L \theta - m = 0\) are provided.
new()Constructs a new instance of this class.
Contrast$new(model_fit, L_mat, m)
model_fitAn object inheriting from FamModelFit.
L_matA contrast vector (1 df) or matrix (>1 df) containing
one contrast in each row. The contrast vector must have a number of
elements equal to the number of model parameters. The contrast matrix
must be of full row rank and have a number of columns equal the number
of model parameters.
mAn optional vector containing the null value for each contrast.
Will be set to the zero vector of length nrow(L_mat) if not
specified.
get_model_fit()Returns model_fit object.
Contrast$get_model_fit()
get_L_mat()Returns L_mat.
Contrast$get_L_mat()
get_m()Returns m.
Contrast$get_m()
get_L_theta_hat_m()Returns \(L \hat{\theta} - m\).
Contrast$get_L_theta_hat_m()
get_V_L_theta_hat()Returns \(L \hat{V}(\hat{\theta}) L^{'}\).
Contrast$get_V_L_theta_hat()
get_X2()Returns Wald chi-square statistic for null hypothesis \(L \theta - m = 0\), which is \((L \hat{\theta} - m)^{'} [L \hat{V}(\hat{\theta}) L^{'}]^{-1} (L \hat{\theta} - m)\).
Contrast$get_X2()
get_df_X2()Returns degrees of freedom of Wald chi-square statistic, which is the rank of \(L\).
Contrast$get_df_X2()
get_p_X2()Returns p-value for Wald chi-square statistic.
Contrast$get_p_X2()
print()Formatted printing of the Contrast object.
Contrast$print(...)
...Arguments passed on to print_ests().
clone()The objects of this class are cloneable with this method.
Contrast$clone(deep = FALSE)
deepWhether to make a deep clone.