Publications by Janet Rosenbaum

Biostatistics 5201: Session 6 - Faraway chapter 6

19.08.2020

library(faraway) library(mosaic) Semiconductor quality These data are from a study of semiconductor quality at a factory. The data evaluate whether the wafer is good or bad, and whether there were particles on the die that made it. y <- c(320,14,80,36) particle <- gl(2,1,4,labels=c("no","yes")) quality <- gl(2,2,labels=c("good","bad")) (wafer <-...

45042 sym R (48900 sym/299 pcs) 9 img

Biostatistics 5201: Session 4 - Faraway chapter 4

17.08.2020

Load the libraries at the start of every session. library(faraway) library(tidyr) library(ggplot2) library(MASS) library(survival) ## ## Attaching package: 'survival' ## The following objects are masked from 'package:faraway': ## ## rats, solder Latent variables Latent variables are theoretical quantities (e.g., ``quantitative ability’�...

14249 sym R (7985 sym/71 pcs) 4 img

Biostatistics 5201: Session 8 - Faraway chapter 8

20.08.2020

Load libraries: library(faraway) library(robust) library(robustbase) library(sandwich) library(mosaic) Bugs data View(bliss) ?bliss modl <- glm(cbind(dead, alive) ~ conc, family=binomial, data=bliss) summary(modl) ## ## Call: ## glm(formula = cbind(dead, alive) ~ conc, family = binomial, data = bliss) ## ## Deviance Residuals: ## 1 ...

9142 sym R (18754 sym/132 pcs) 14 img

Biostatistics 5201: Homework 1 solution

19.09.2020

library(faraway) library(MASS) library(splines) library(dplyr) library(brglm) library(ggplot2) library(arm) library(mosaic) Problems from Faraway 2 Faraway Chapter 2, 1 Before doing the problem, look at the help page for the dataset ?wbca The dataset wbca comes from a study of breast cancer in Wisconsin. There are 681 cases of potentially c...

28478 sym R (13954 sym/80 pcs) 16 img

Epi 5201/7201 Data management - YRBS 2019

06.10.2020

The purpose of this session The goal of this session is to 1. Demonstrate how to load YRBS data 2. Show some examples of how to code variables from YRBS. For the first project assignment you will only need to code 2 variables: an exposure and an outcome. 3. Give many additional examples that may be useful for the project. Your goal right now shou...

51689 sym R (34868 sym/175 pcs) 2 img

Biostatistics 5201: Session 11 - Faraway chapter 16

06.11.2020

Faraway, Chapter 16 library(faraway) library(rpart) library(mosaic) library(rpart.plot) library(randomForest) library(MASS) Ozone data View(ozone) ?ozone histogram(~O3, data=ozone) xyplot(O3 ~ temp, data=ozone) pairs(with(ozone, data.frame(O3, temp, ibh, ibt))) (tmod <- rpart(O3 ~ .,ozone)) ## n= 330 ## ## node), split, n, deviance, yval ##...

14302 sym R (17059 sym/145 pcs) 29 img

Epi 5201/7201 Data management - continuous variables - HELPrct

13.11.2020

The session 3 Rmarkdown file showed how to manage YRBS data, which is nearly all categorical. We still haven’t talked much about quantitative/continuous/numeric variables. To demonstrate continuous/numeric variables, we’ll use the HELPrct dataset. Load the library — use the message=F in order to suppress the messages that fill up our HTML f...

5595 sym R (713 sym/12 pcs) 6 img

Document

05.06.2021

Load libraries library(mosaic) library(readstata13) library(arm) library(survey) Set working directory and load the data. setwd("~/Dropbox/Epidemiology5201-Summer2021/datasets/yrbs2019") yrbs=read.dta13("yrbs2019.dta") Set survey design yrbsdes = svydesign(id=~psu, weight=~weight, strata=~stratum, data=yrbs, nest=TRUE) Define all the variab...

5710 sym R (4538 sym/23 pcs)

Mortality delay draft model

10.06.2021

Define variables Libraries library(plm) library(car) library(lmtest) library(mosaic) library(taRifx) library(lme4) library(tidyr) library(faraway) library(pbkrtest) library(gee) library(performance) library(robustlmm) library(ggsci) library(scales) library(nlme) library(rstanarm) library(bayesplot) theme_set(bayesplot::theme_default()) Variable...

6643 sym R (19783 sym/25 pcs)

Epi 5201/7201 Project skill: Making regression table

09.06.2021

The purpose of this Rmarkdown file In this file, we’ll perform and interpret a regression and format it in a table that can be included in your papers. Define variables Before we can make a table, we need variables. These are all from prior project files, so I’ve taken out the extra tally commands. Load libraries, including libraries for tab...

11361 sym R (5515 sym/27 pcs) 1 tbl