1.soru 5 data seçme

Seçtiğim datalar:wage1,saving,smoke,wine,catholic

library(wooldridge)
## Warning: package 'wooldridge' was built under R version 4.1.2
data(wage1)
data(saving)
data("smoke")
data(wine)
data(lowbrth)

Değişken anlamları

wage1 için:

wage:Saatlik ücret

educ:Eğitim

exper:Yıllık deneyim

lowbrth için:

popul:nüfus 1000s

pcinc:kişi başı gelir

lowbrth:az kilo doğum

Wine için:

death:100 bin kişide ölüm

heart:Kalp hastalığı 100 bin kişide

liver:Karaciğer hastalığı liver:karaçiğer diye hatırlıyorum

Smoke için:

cigs:Günlük sıgara içim sayısı

educ:Eğitim süresi

cigpric:Eyalet sıgara fiyatı

Saving için:

size:Aile boyutu

sav:Yıllık tasarruf

cons:Yıllık Tüketim

2.Bu 5 veri setinden birini seçin ver en az 4 bağımısz değişkenli bir model tahmin edin. lowbrth değişkeni seçtim

library(wooldridge)
data(lowbrth)
library(rmarkdown)
paged_table(lowbrth)
?lowbrth
## starting httpd help server ... done

Model Tahmini log(popul)=β0+β1year+β2infmort+β3lowbrth+β4pcinc+u

Model sonucu ve T testi Bahsedin

Çokreg <- lm(log(popul)~ year+infmort+lowbrth+pcinc,data = lowbrth)
summary(Çokreg)
## 
## Call:
## lm(formula = log(popul) ~ year + infmort + lowbrth + pcinc, data = lowbrth)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.22543 -0.54343  0.02747  0.57049  2.29291 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.531e+02  1.481e+02   1.709 0.090760 .  
## year        -1.256e-01  7.459e-02  -1.684 0.095390 .  
## infmort      5.159e-02  9.442e-02   0.546 0.586041    
## lowbrth      3.248e-01  1.108e-01   2.931 0.004230 ** 
## pcinc        1.266e-04  3.526e-05   3.590 0.000525 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9016 on 95 degrees of freedom
## Multiple R-squared:  0.2334, Adjusted R-squared:  0.2011 
## F-statistic:  7.23 on 4 and 95 DF,  p-value: 3.978e-05
library(coefplot)
## Warning: package 'coefplot' was built under R version 4.1.2
## Zorunlu paket yükleniyor: ggplot2
## Warning: package 'ggplot2' was built under R version 4.1.2
coefplot(Çokreg)
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.
## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

## Warning: It is deprecated to specify `guide = FALSE` to remove a guide. Please
## use `guide = "none"` instead.

### Her bağımsız değişken katsayısı için bir güven aralığı oluşturun ve güven aralığı grafiğini çizin

confint(Çokreg)
##                     2.5 %       97.5 %
## (Intercept) -4.095630e+01 5.472004e+02
## year        -2.737035e-01 2.244035e-02
## infmort     -1.358500e-01 2.390394e-01
## lowbrth      1.048243e-01 5.448294e-01
## pcinc        5.659459e-05 1.966045e-04
confint(Çokreg, level=0.99)
##                     0.5 %       99.5 %
## (Intercept) -1.362530e+02 6.424971e+02
## year        -3.216866e-01 7.042337e-02
## infmort     -1.965919e-01 2.997812e-01
## lowbrth      3.353206e-02 6.161216e-01
## pcinc        3.390933e-05 2.192898e-04

5.soru İstediğiniz katsayılar için bir kısıtlı model oluşturun ve F testi yapın. Sonuçlarınızı açıklayın.

Bu soruyu beceremedim hocam

6 CV HAZIRLAYIN

CVlink:https://rpubs.com/Mertcon25/850208