estimator.nleqslv: Estimators for the PIM parameters

Description Usage Arguments Details Value Note

Description

Estimators for the PIM parameters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
estimator.nleqslv(jac = NULL, method = c("Broyden", "Newton"),
  global = c("dbldog", "pwldog", "qline", "gline", "none"),
  xscalm = c("fixed", "auto"), control = list(ftol = 1e-06),
  scoreFunctionCreator = scorefunctioncreator.default,
  treat.convergence.error = c("warn", "error", "log", "ignore"))

estimator.glm(control = list())

estimator.glmnet(alpha = 1, nlambda = 100, lambda = NULL,
  standardize = TRUE, penalize.intercepts = FALSE)

estimator.BB(method = c(2, 3, 1), control = list(), quiet = FALSE,
  scoreFunctionCreator = scorefunctioncreator.default,
  treat.convergence.error = c("warn", "error", "log", "ignore"))

estimator.trymultiple(scoreFunctionCreator = scorefunctioncreator.default)

scorefunctioncreator.default(Z, Y, link, W = NULL)

estimator.lqa(control = lqa.control(), penalty = NULL,
  method = "lqa.update2", standardize = TRUE, penalize.intercepts = FALSE)

Arguments

jac, global, xscalm

See nleqslv.

method

See nleqslv / BBsolve / lqa.

control

See nleqslv / BBsolve / glm.fit / lqa.

scoreFunctionCreator

Function that will create the score vector function. This defaults to scorefunctioncreator.default and should be of the same form (and return a function of the same form as scorefunctioncreator.default).

treat.convergence.error

Defaults to "warn", so a warning will be issued with the errorcode of the nleqslv or BBsolve call. "error" will generate an error on convergence issues. "log" will simply note the occurence in the output window and "ignore" will do just that. In most situations you can avoid the convergence issues by properly specifying the nleqslv parameters. This can be investigated e.g. through estimator.trymultiple.

alpha, nlambda, lambda, standardize

See glmnet.

penalize.intercepts

If an intercept is present in the model, penalize it or not.

quiet

See BBsolve.

Z

Pseudo-observation design matrix

Y

Pseudo-outcomes.

link

Name of the link function.

W

Weights to be applied to the pseudo-observations.

penalty

Any lqa-supported penalty.

Details

These functions estimate the coefficients (/parameters) of the PIM by solving the (sometimes) nonlinear equations. Each calls upon another library for the solution and some may be more accurate / correct / performant depending on the specific model.

estimator.glm returns the regular glm estimate (assuming the pseudo- observations are independent)

estimator.glmnet returns the elsatic net penalized glmnet estimate (assuming, again, the pseudo-observations are independent)

For the different implementations, morefitinfo contains:

  1. estimator.nleqslv The return value of the nleqslv call

  2. estimator.glm The return value of the glm call

  3. estimator.glmnet The return value of the glmnet call, with some added items: usedalpha, usedfamily,usedoffset and standardize

  4. estimator.BB The return value of the BBsolve call

estimator.trymultiple is a special case that will simply try to use nleqslv, and with several parameters, hoping that one may lead to a fit. Although it provides the best chance of getting a fit, take care in assuring that the fit matches the covariance estimator! Also be aware that this may be slow.

Value

These functions (estimator.*) each return a function themselves. The returned function should have three parameters (startvalues, a set of initial estimates of the parameters; pfd, an object of class pimfitdata ; link, the name of the link function) and should itself return a list of two items:

coefficients

The parameter estimates

morefitinfo

Implementation specific information on the fit

For scorefunctioncreator.default: a function that takes a set of parameter estimates (beta) and calculates a set of values that should be solved for zero.

Note

For estimator.glmnet, coefficients contains a sparse matrix holding the coefficient estimates and intercept (!) for all lambda values.


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