robustlogrm: Fit a robust logistic regression model

Description Usage Arguments Details Value Examples

View source: R/robustlogrm.R

Description

This function is basically a wrapper for function glm2 of package glm2. When a regressor is found to have only one value (thus producing the 'contrasts error' – see e.g. stackoverflow).

When there more than one regressor with only one value in the data set, an error is returned prompting for manual check. When only one regressor is found to have one value, the model is again fitted dropping the intercept.

Usage

1

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 (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which robustlogrm is called.

...

extra arguments to be used to form the default control argument.

Details

A typical predictor has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response. The response can also be specified as a factor or as a two-column matrix with the columns giving the numbers of successes and failures. A terms specification of the form first + second indicates all the terms in first together with all the terms in second with any duplicates removed.

A specification of the form first:second indicates the set of terms obtained by taking the interactions of all terms in first with all terms in second. The specification first*second indicates the cross of first and second. This is the same as first + second + first:second.

Value

The value returned by robustlogrm has exactly the same documentation as the value returned by glm, except for: method, the name of the fitter function used, which by default is glm.fit2.

Examples

1
2
3
4
5
## Not run: 
ExcelName <- 'T:/E30163/E30163.NombresVariables_V1.xlsx'
ValidateXLS(ExcelName)

## End(Not run)

david-salgado/categObsPredModelParam documentation built on Dec. 3, 2020, 1:42 p.m.