Description Usage Format Source References See Also Examples
Data on proportion of income spent on food for a random sample of 38 households in a large US city.
1 | data("FoodExpenditure")
|
A data frame containing 38 observations on 3 variables.
household expenditures for food.
household income.
number of persons living in household.
Taken from Griffiths et al. (1993, Table 15.4).
Cribari-Neto, F., and Zeileis, A. (2010). Beta Regression in R. Journal of Statistical Software, 34(2), 1–24. doi: 10.18637/jss.v034.i02
Ferrari, S.L.P., and Cribari-Neto, F. (2004). Beta Regression for Modeling Rates and Proportions. Journal of Applied Statistics, 31(7), 799–815.
Griffiths, W.E., Hill, R.C., and Judge, G.G. (1993). Learning and Practicing Econometrics New York: John Wiley and Sons.
1 2 3 4 5 6 7 8 9 10 11 | data("FoodExpenditure", package = "betareg")
## Ferrari and Cribari-Neto (2004)
## Section 4
fe_lin <- lm(I(food/income) ~ income + persons, data = FoodExpenditure)
library("lmtest")
bptest(fe_lin)
## Table 2
fe_beta <- betareg(I(food/income) ~ income + persons, data = FoodExpenditure)
summary(fe_beta)
|
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
studentized Breusch-Pagan test
data: fe_lin
BP = 5.9348, df = 2, p-value = 0.05144
Call:
betareg(formula = I(food/income) ~ income + persons, data = FoodExpenditure)
Standardized weighted residuals 2:
Min 1Q Median 3Q Max
-2.7818 -0.4445 0.2024 0.6852 1.8755
Coefficients (mean model with logit link):
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.622548 0.223854 -2.781 0.005418 **
income -0.012299 0.003036 -4.052 5.09e-05 ***
persons 0.118462 0.035341 3.352 0.000802 ***
Phi coefficients (precision model with identity link):
Estimate Std. Error z value Pr(>|z|)
(phi) 35.61 8.08 4.407 1.05e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Type of estimator: ML (maximum likelihood)
Log-likelihood: 45.33 on 4 Df
Pseudo R-squared: 0.3878
Number of iterations: 28 (BFGS) + 4 (Fisher scoring)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.