methods-mitml.testEstimates.RdFunctions for extracting results and computing confidence intervals from the pooled parameter estimates computed with testEstimates.
An object of class mitml.testEstimates as produced by testEstimates.
(optional) A reference to the parameters for which to calculate confidence intervals. Can be a character or integer vector denoting names or position of parameters, respectively. If missing, all parameters are considered (the default).
The confidence level. Default is to 0.95 (i.e., 95%).
Not being used.
These functions can be used to extract information and compute additional results from pooled parameter estimates.
The coef and vcov methods extract the pooled parameter estimates and their pooled variance-covariance matrix (with the squared standard errors in the diagonal).
The confint method computes confidence intervals with the given confidence level for the pooled parameters on the basis of a \(t\)-distribution, with estimates, standard errors, and degrees of freedom as returned by testEstimates.
For coef: A vector containing the pooled parameter estimates
For vcov: A matrix containing the pooled variance-covariance matrix of the parameter estimates.
For confint: A matrix containing the lower and upper bounds of the confidence intervals.
data(studentratings)
fml <- ReadDis ~ ReadAchiev + (1|ID)
imp <- panImpute(studentratings, formula = fml, n.burn = 500, n.iter = 100, m = 5)
#> Running burn-in phase ...
#> Creating imputed data set ( 1 / 5 ) ...
#> Creating imputed data set ( 2 / 5 ) ...
#> Creating imputed data set ( 3 / 5 ) ...
#> Creating imputed data set ( 4 / 5 ) ...
#> Creating imputed data set ( 5 / 5 ) ...
#> Done!
implist <- mitmlComplete(imp)
# fit regression model
fit <- with(implist, lm(ReadDis ~ 1 + ReadAchiev))
est <- testEstimates(fit)
# extract parameter estimates and variance-covariance matrix
coef(est)
#> (Intercept) ReadAchiev
#> 3.687495352 -0.002230669
vcov(est)
#> (Intercept) ReadAchiev
#> (Intercept) 1.858443e-02 -3.698929e-05
#> ReadAchiev -3.698929e-05 7.684560e-08
# compute confidence intervals
confint(est)
#> 2.5 % 97.5 %
#> (Intercept) 3.419807520 3.955183184
#> ReadAchiev -0.002775746 -0.001685591
# ... with different confidence levels
confint(est, level = 0.90)
#> 5 % 95 %
#> (Intercept) 3.462942487 3.912048218
#> ReadAchiev -0.002687766 -0.001773572
confint(est, level = 0.999)
#> 0.05 % 99.95 %
#> (Intercept) 3.236875052 4.138115652
#> ReadAchiev -0.003150063 -0.001311274