frmselect: fractional model selection function based on quasi-likelihood

Description Usage Arguments Value Examples

View source: R/frmselect.R

Description

frmselect is used to select a formula-based model by information criterions of fractional regression models.

Usage

1
frmselect(x, y, criterion="AIC",linkfrac="logit", method="forward", plotit=FALSE)

Arguments

x

a numeric matrix, with column names, containing the values of the covariates.

y

a numeric vector containing the values of the response variable. It should be between 0 and 1.

criterion

model selection critetion. Available options: AIC, BIC, HQ.The default value is AIC.

linkfrac

link function, Available options: logit, probit, loglog, cloglog, cauchit.The default value is logit.

method

the mode of stepwise search and allsubsets. Available options: forward, backward, both, allsubsets.The default value is forward.

plotit

Default value is FALSE. If TRUE, it would plot the number of variables vs minimal criteria.

Value

A list contains information criterion, link function, model selection method, minimal criteria of corresponding number of variables, minimal information criterion, the order of variables which are chosen in the model, the names of corresponding variables and the estimated coefficients of them.

Examples

1
2
3
4
5
6
set.seed(123)
library(bamlss)
d <- GAMart()
x <- as.matrix(data.frame(d$x1, d$x2, d$x3))
y <- d$bnum
frmselect(x, y)

Lydia2kkx/frmselection documentation built on May 27, 2019, 2:05 p.m.