Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

propols.reg

Non linear least squares regression for percentages or proportions


Description

Non linear least squares regression for percentages or proportions.

Usage

propols.reg(y, x, cov = FALSE, tol = 1e-07 ,maxiters = 100)

Arguments

y

The dependent variable, a numerical vector with percentages or proporions, including 0s and or 1s.

x

A matrix with the indendent variables.

cov

Should the sandwich covariance matrix and the standard errors be returned? If yes, set this equal to TRUE.

tol

The tolerance value to terminate the Newton-Raphson algorithm. This is set to 10^{-7} by default.

maxiters

The maximum number of iterations that can take place during the fitting.

Details

The ordinary least squares between the observed and the fitted percentages is adopted as the objective function. This involves numerical optimization since the relationship is non-linear. There is no log-likelihood. This is the univariate version of the OLS regression for compositional data mentioned in Murteira and Ramalho (2016).

Value

A list including:

sse

The sum of squares of the raw residuals.

be

The beta coefficients.

seb

The sandwich standard errors of the beta coefficients, if the input argument argument was set to TRUE.

covb

The sandwich covariance matrix of the beta coefficients, if the input argument argument was set to TRUE.

iters

The number of iterations required by the Newton-Raphson algorithm.

Author(s)

Michail Tsagris

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

References

Murteira, Jose MR, and Joaquim JS Ramalho 2016. Regression analysis of multivariate fractional data. Econometric Reviews 35(4): 515-552.

See Also

Examples

y <- rbeta(150, 3, 4)
x <- iris
a <- propols.reg(y, x)

Rfast2

A Collection of Efficient and Extremely Fast R Functions II

v0.0.9
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Initial release
2021-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.