beta.mod: Beta regression

View source: R/beta.mod.R

Beta regressionR Documentation

Beta regression

Description

Beta regression.

Usage

beta.mod(target, dataset, wei = NULL, xnew= NULL) 

Arguments

target

The target (dependent) variable. It must be a numerical vector with proportions, excluding 0s and 1s.

dataset

The indendent variable(s). It can be a vector, a matrix or a dataframe with continuous only variables, a data frame with mixed or only categorical variables. If this is NULL, a beta distribution is fitted, no covariates are present.

wei

A vector of weights to be used for weighted regression. The default value is NULL. An example where weights are used is surveys when stratified sampling has occured.

xnew

If you have new values for the predictor variables (dataset) whose target variable you want to predict insert them here. If you put the "dataset" or leave it NULL.

Details

The beta regression is fitted. The "beta.reg" is an internal wrapper function and is used for speed up purposes. It is not to be called directly by the user unless they know what they are doing.

Value

A list including:

be

The estimated coefficients of the model.

phi

The estimated precision parameter.

loglik

The log-likelihood of the regression model.

est

The estimated values if xnew is not NULL.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr

References

Ferrari S.L.P. and Cribari-Neto F. (2004). Beta Regression for Modelling Rates and Proportions. Journal of Applied Statistics, 31(7): 799-815.

See Also

beta.regs, testIndBeta, reg.fit, ridge.reg

Examples

y <- rbeta(300, 3, 5)
x <- matrix( rnorm(300 * 2), ncol = 2)
a1 <- beta.mod(y, x)
w <- runif(300)
a2 <- beta.mod(y, x, w)

MXM documentation built on Aug. 25, 2022, 9:05 a.m.