confint.mitml.testEstimates: Compute confidence intervals

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/confint.mitml.testEstimates.R

Description

Computes confidence intervals on the basis of the final parameter estimates and inferences given by testEstimates.

Usage

1
2
## S3 method for class 'mitml.testEstimates'
confint(object, parm, level = 0.95, ...)

Arguments

object

An object of class mitml.testEstimates as produced by testEstimates.

parm

(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).

level

The confidence level. Default is to 0.95 (i.e., 95%).

...

Not being used.

Details

This function 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.

Value

A matrix containing the lower and upper bounds of the confidence intervals.

Author(s)

Simon Grund

See Also

testEstimates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(studentratings)

fml <- ReadDis ~ ReadAchiev + (1|ID)
imp <- panImpute(studentratings, formula = fml, n.burn = 500, n.iter = 100, m = 5)

implist <- mitmlComplete(imp)

# fit regression model
fit <- with(implist, lm(ReadDis ~ 1 + ReadAchiev))
est <- testEstimates(fit)

# compute confidence intervals
confint(est)

# ... with different confidence levels
confint(est, level = 0.90)
confint(est, level = 0.999)

Example output

*** This is beta software. Please report any bugs!
*** See the NEWS file for recent changes.
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!
                   2.5 %       97.5 %
(Intercept)  3.386647255  3.981880616
ReadAchiev  -0.002858689 -0.001587219
                     5 %         95 %
(Intercept)  3.435386992  3.933140878
ReadAchiev  -0.002753052 -0.001692856
                  0.05 %      99.95 %
(Intercept)  3.173408388  4.195119483
ReadAchiev  -0.003334085 -0.001111823

mitml documentation built on Oct. 5, 2021, 5:07 p.m.