Distance based regression models for proportions
Distance based regression models for proportions.
ols.prop.reg(y, x, cov = FALSE, tol = 1e-07, maxiters = 100) helling.prop.reg(y, x, tol = 1e-07, maxiters = 100)
y |
A numerical vector proportions. 0s and 1s are allowed. |
x |
A matrix or a data frame with the predictor variables. |
cov |
Should the covariance matrix be returned? TRUE or FALSE. |
tol |
The tolerance value to terminate the Newton-Raphson algorithm. This is set to 10^{-9} by default. |
maxiters |
The maximum number of iterations before the Newton-Raphson is terminated automatically. |
We are using the Newton-Raphson, but unlike R's built-in function "glm" we do no checks and no extra calculations, or whatever. Simply the model. The functions accept binary responses as well (0 or 1).
A list including:
sse |
The sum of squres of errors for the "ols.prop.reg" function. |
be |
The estimated regression coefficients. |
seb |
The standard error of the regression coefficients if "cov" is TRUE. |
covb |
The covariance matrix of the regression coefficients in "ols.prop.reg" if "cov" is TRUE. |
H |
The Hellinger distance between the true and the obseervd proportions in "helling.prop.reg". |
iters |
The number of iterations required by the Newton-Raphson. |
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
Papke L. E. & Wooldridge J. (1996). Econometric methods for fractional response variables with an application to 401(K) plan participation rates. Journal of Applied Econometrics, 11(6): 619–632.
McCullagh, Peter, and John A. Nelder. Generalized linear models. CRC press, USA, 2nd edition, 1989.
y <- rbeta(100, 1, 4) x <- matrix(rnorm(100 * 2), ncol = 2) a1 <- ols.prop.reg(y, x) a2 <- helling.prop.reg(y, x)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.