add.varianceestimate: Add (co)variance estimates to a PIM

Description Usage Arguments Details Value Note See Also Examples

Description

Add (co)variance estimates to a PIM

Usage

1
2

Arguments

object

pim object

varianceestimator

Function like the result of varianceestimator.sandwich() (the default). See there to find the required form of this function or some provided alternatives.

estimator

Function like the result of estimator.nleqslv() (the default). Note: this should be the same as was originally used for creating the PIM. This cannot be retrieved from object as saving it would have a big impact.

verbosity

The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output)

Details

The result should be the same as you would have gotten if you passed along the varianceestimator to the original pim call. Important: this function will only work for PIMs where you specified keep.data=TRUE.

Value

An object of class pim. The covariance related items are replaced in object, or added. Typically, these are vcov and morevarfitinfo

Note

Most variance estimators do not actually use the estimator. The only one know at the time of this writing is varianceestimator.bootstrap. So in practice this parameter can probably be mostly ignored.

See Also

estimator.nleqslv varianceestimator.sandwich pim

Examples

1
2
3
4
5
set.seed(1)
iris$out<-factor(sample(2, nrow(iris), replace=TRUE))
iris$xord<-as.ordered(iris$Species)
pima<-pim(out~Sepal.Length, data=iris, keep.data=TRUE, link="identity")
pimb<-add.varianceestimate(pima, varianceestimator=varianceestimator.H0())

pimold documentation built on May 2, 2019, 5:50 p.m.