pim.fit: Actually fit the pim

Description Usage Arguments Details Value Note See Also Examples

Description

Actually fit the pim from prepared data

Usage

1
2
3
4
pim.fit(pfd, link = c("logit", "identity", "probit", "inverse", "1/mu^2",
  "log"), estimator = estimator.nleqslv(),
  varianceestimator = varianceestimator.sandwich(), verbosity = 0,
  nicenames = TRUE)

Arguments

pfd

Object of class pimfitdata

link

Name of the link function (defaults to "identity")

estimator

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

varianceestimator

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

verbosity

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

nicenames

Defaults to TRUE: try to make the column names more readable.

Details

The presence or absence or form of the items in the return value depends mainly upon the passed along estimator and varianceestimator.

If estimator fails, no attempt is taken to estimate the covariances (and the matching items are not in the return value). If varianceestimator was NULL, the items are simply set to NULL.

If varianceestimator is executed, but it fails, the error is saved in an additional item varestimationerror.

Value

List with (some of) the items:

coefficients

Parameter estimates. See estimator.nleqslv

morefitinfo

Parameter estimation info. See estimator.nleqslv

fitted.values

Predicted pseudo-observation values.

vcov

Covariance estimates. See varianceestimator.sandwich

morevarfitinfo

Covariance estimation info. See varianceestimator.sandwich

Note

Typically, you will not use this method directly (similarly as glm.fit for glm)

See Also

estimator.nleqslv varianceestimator.sandwich

Examples

1
2
3
4
5
set.seed(1)
	iris$out<-factor(sample(2, nrow(iris), replace=TRUE))
	poset<-noselfposet(iris, out~Sepal.Length)$poset
	pfd<-pim.fit.prep(out~Sepal.Length, data=iris, poset=poset)
	pf<-pim.fit(pfd)

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