library(wooldridge)
data(bwght, package = 'wooldridge')
library(rmarkdown)
paged_table(bwght)
\[\hat{bwght}= \hat{\beta }_0 + \hat{\beta }_1 \cdot cigs + \hat{\beta }_2 faminc \] Birinci regresyon
lm(bwght ~ cigs + faminc, data = bwght)
##
## Call:
## lm(formula = bwght ~ cigs + faminc, data = bwght)
##
## Coefficients:
## (Intercept) cigs faminc
## 116.97413 -0.46341 0.09276
lm(bwght$bwght ~ bwght$cigs + bwght$faminc)
##
## Call:
## lm(formula = bwght$bwght ~ bwght$cigs + bwght$faminc)
##
## Coefficients:
## (Intercept) bwght$cigs bwght$faminc
## 116.97413 -0.46341 0.09276
İkinci regresyon
Doğum ağırlıklarını ons yerine pound cinsinden ölçtüğünüzde ne değişir?
bwght$bwghtlbs <- bwght$bwght / 16
lm(bwght$bwghtlbs ~ bwght$cigs + bwght$faminc)
##
## Call:
## lm(formula = bwght$bwghtlbs ~ bwght$cigs + bwght$faminc)
##
## Coefficients:
## (Intercept) bwght$cigs bwght$faminc
## 7.310883 -0.028963 0.005798
lm(I(bwght/16) ~ cigs + faminc, data = bwght)
##
## Call:
## lm(formula = I(bwght/16) ~ cigs + faminc, data = bwght)
##
## Coefficients:
## (Intercept) cigs faminc
## 7.310883 -0.028963 0.005798
Üçüncü regresyon
lm(bwght ~ I(cigs/20) + faminc, data = bwght)
##
## Call:
## lm(formula = bwght ~ I(cigs/20) + faminc, data = bwght)
##
## Coefficients:
## (Intercept) I(cigs/20) faminc
## 116.97413 -9.26815 0.09276
model_1<- lm(bwght ~ cigs + faminc, data = bwght)
model_2<- lm(I(bwght/16) ~ cigs + faminc, data = bwght)
model_3<- lm(bwght ~ I(cigs/20) + faminc, data = bwght)
library(stargazer)
##
## Please cite as:
## Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
## R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
stargazer(list(model_1,model_2,model_3), type = "text")
##
## =================================================================
## Dependent variable:
## ---------------------------------
## bwght I(bwght/16) bwght
## (1) (2) (3)
## -----------------------------------------------------------------
## cigs -0.463*** -0.029***
## (0.092) (0.006)
##
## I(cigs/20) -9.268***
## (1.832)
##
## faminc 0.093*** 0.006*** 0.093***
## (0.029) (0.002) (0.029)
##
## Constant 116.974*** 7.311*** 116.974***
## (1.049) (0.066) (1.049)
##
## -----------------------------------------------------------------
## Observations 1,388 1,388 1,388
## R2 0.030 0.030 0.030
## Adjusted R2 0.028 0.028 0.028
## Residual Std. Error (df = 1385) 20.063 1.254 20.063
## F Statistic (df = 2; 1385) 21.274*** 21.274*** 21.274***
## =================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01