betaselect: fractional model selection function based on beta regression

Description Usage Arguments Value Examples

View source: R/betaselect.R

Description

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

Usage

1
betaselect(x, y, criterion, link, method, plotit)

Arguments

x

a numeric matrix or data frame, 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.

link

link function, Available options: logit, probit, loglog, cloglog, log, 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 <- data.frame(d$x1, d$x2, d$x3)
y <- d$bnum
betaselect(x, y)

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