Publications by Lydia Okabe

DocumentHomework7

29.03.2021

##load libraries library(car) ## Loading required package: carData library(stargazer) ## ## Please cite as: ## Hlavac, Marek (2018). stargazer: Well-Formatted Regression and Summary Statistics Tables. ## R package version 5.2.2. https://CRAN.R-project.org/package=stargazer library(survey) ## Loading required package: grid ## Loading required ...

634 sym R (7485 sym/43 pcs) 8 img

Document Homework 6

22.03.2021

#load brfss library(car) library(stargazer) library(survey) library(sjPlot) library(ggplot2) #load data library(haven) nhis_4 <- read_stata("nhis_00004.dta.gz") View(nhis_4) nhis_4$ervisit<-Recode(nhis_4$eryrno, recodes = "20=1;30=2;41=3;40=4;42=5;43=6;50=7;60=8;61:62=9;00=NA;97:99=NA;10=NA") hist(nhis_4$ervisit) summary(nhis_4$ervis...

454 sym R (12016 sym/54 pcs) 2 img

Document Okabe Homework 5

15.03.2021

#load libraries library(car) ## Loading required package: carData library(VGAM) ## Loading required package: stats4 ## Loading required package: splines ## ## Attaching package: 'VGAM' ## The following object is masked from 'package:car': ## ## logit library(stargazer) ## ## Please cite as: ## Hlavac, Marek (2018). stargazer: Well-Fo...

774 sym R (21857 sym/64 pcs) 1 img

Document Homework 8

12.04.2021

library(car) library(mice) ## Warning: package 'mice' was built under R version 4.0.4 library(ggplot2) library(dplyr) library(haven) #load data load("C:/Users/okabe/OneDrive/Pictures/Stats 2/brfss_2017 (1).Rdata") View(brfss_17) set.seed(1234) samp<-sample(1:dim(brfss_17)[1], size = 25000) #smaller sample for brevity brfss_17<-brfss_17[...

663 sym R (18521 sym/65 pcs) 4 img

Document Homework 10

03.05.2021

#load brfss library(car) library(stargazer) library(survey) library(sjPlot) library(ggplot2) library(pander) library(knitr) library(dplyr) library(tidycensus) library(lme4) library(lmerTest) library(arm) load(url("https://github.com/coreysparks/data/blob/master/brfss_2017.Rdata?raw=true")) set.seed(12345) #samps<-sample(1:nrow(brfs...

667 sym R (7855 sym/27 pcs) 1 img

Document Homework 9

25.04.2021

library(mgcv) #one library for GAMs ## Loading required package: nlme ## This is mgcv 1.8-35. For overview type 'help("mgcv-package")'. library(ggplot2) library(dplyr) ## ## Attaching package: 'dplyr' ## The following object is masked from 'package:nlme': ## ## collapse ## The following objects are masked from 'package:stats': ## ## ...

544 sym R (6499 sym/28 pcs) 2 img