pim: Fitting a Probabilistic Index Model

Description Usage Arguments Details Value See Also

View source: R/pim.R

Description

This function is the main function to fit a probabilistic index model or PIM.

Usage

1
2
3
4
pim(formula, data, link = c("logit", "probit", "identity"),
  compare = c("unique", "all"), model = c("difference", "marginal",
  "regular", "customized"), na.action = getOption("na.action"),
  weights = NULL, keep.data = FALSE, ...)

Arguments

formula

An object of class formula (or one that can be coerced to that class): A symbolic description of the model to be fitted. The details of model specification are given under 'Details'.

data

an optional data frame, list or environment that contains the variables in the model. Objects that can be coerced by as.data.frame can be used too.

link

a character vector with a single value that determines the used link function. Possible values are "logit", "probit" and "identity". The default is "logit".

compare

a character vector with a single value that describes how the model compares observations. It can take the values "unique" or "all". Alternatively you can pass a matrix with two columns. Each row represents the rownumbers in the original data frame that should be compared to eachother. See Details.

model

a single character value with possible values "difference" (the default), "marginal", "regular" or "customized". If the formula indicates a customized model (by the use of L() or R()), this parameter is set automatically to "customized"

na.action

the name of a function which indicates what should happen when the data contains NAs. The default is set by the na.action setting of options, and is na.fail when unset.

weights

Currently not implemented.

keep.data

a logical value indicating whether the model matrix should be saved in the object. Defaults to FALSE. See Details.

...

extra parameters sent to pim.fit

Details

A BIT MORE INFO ON FITTING MODELS IS NEEDED

It's possible to store the model matrix and psuedo responses in the resulting object. By default this is not done (keep.data = FALSE) as this is less burden on the memory and the pim.formula object contains all information to reconstruct both the model matrix and the pseudo responses. If either the model matrix or the pseudo responses are needed for further calculations, setting keep.data to TRUE might reduce calculation time for these further calculations.

Value

An object of class pim. See pim-class for more information.

See Also

pim-class for more information on the returned object, pim.fit for more information on the fitting itself, and — INSERT GETTERS —


pimdevel documentation built on May 31, 2017, 2:44 a.m.