library(wooldridge)
## Warning: package 'wooldridge' was built under R version 4.2.3
library(rmarkdown)
## Warning: package 'rmarkdown' was built under R version 4.2.3
data("fertil1")
paged_table(fertil1)
require(dplyr)
## Loading required package: dplyr
## Warning: package 'dplyr' was built under R version 4.2.3
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
Loading required package: dplyr
Attaching package: ‘dplyr’ The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
fertil1 %>%
group_by(year) %>%
summarise("ortalama çocuk sayısı (kids)" = mean(kids))
## # A tibble: 7 × 2
## year `ortalama çocuk sayısı (kids)`
## <int> <dbl>
## 1 72 3.03
## 2 74 3.21
## 3 76 2.80
## 4 78 2.80
## 5 80 2.82
## 6 82 2.40
## 7 84 2.24
require(dplyr)
fertil1 %>%
group_by(year) %>%
summarise(across(everything(), mean))
## # A tibble: 7 × 27
## year educ meduc feduc age kids black east northcen west farm
## <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 72 12.2 8.33 8.90 44.9 3.03 0.0833 0.333 0.231 0.128 0.173
## 2 74 12.3 8.94 9.29 44.1 3.21 0.0578 0.237 0.353 0.110 0.208
## 3 76 12.2 8.25 8.99 43.5 2.80 0.0461 0.263 0.316 0.0855 0.237
## 4 78 12.6 9.07 9.80 43.4 2.80 0.0490 0.273 0.329 0.105 0.203
## 5 80 12.9 9.40 9.95 43.7 2.82 0.0704 0.141 0.394 0.155 0.218
## 6 82 13.2 9.56 10.2 43.2 2.40 0.199 0.231 0.290 0.0806 0.167
## 7 84 13.3 10.2 10.7 41.8 2.24 0.0678 0.260 0.333 0.102 0.192
## # ℹ 16 more variables: othrural <dbl>, town <dbl>, smcity <dbl>, y74 <dbl>,
## # y76 <dbl>, y78 <dbl>, y80 <dbl>, y82 <dbl>, y84 <dbl>, agesq <dbl>,
## # y74educ <dbl>, y76educ <dbl>, y78educ <dbl>, y80educ <dbl>, y82educ <dbl>,
## # y84educ <dbl>
require(dplyr)
fertil1 %>%
group_by(year) %>%
summarise("ortalama çocuk sayısı (kids)" = mean(kids), "stadandart sapma çocuk sayısı (kids)" = sd(kids) )
## # A tibble: 7 × 3
## year `ortalama çocuk sayısı (kids)` `stadandart sapma çocuk sayısı (kids)`
## <int> <dbl> <dbl>
## 1 72 3.03 1.83
## 2 74 3.21 1.50
## 3 76 2.80 1.66
## 4 78 2.80 1.58
## 5 80 2.82 1.58
## 6 82 2.40 1.70
## 7 84 2.24 1.51