Publications by Christine Thomas

DEM 7273 - Lab 1 - Introduction to R

04.09.2020

Objectives: Get familiar with R and Rstudio Know how to set working directory Know how to read a data file into R Know the basics of R and Rstudio setwd("C:/Users/cs49226/Documents/Fall 2020/Stats/R") a. Calculate 444 4^4^4 ## [1] 1.340781e+154 b. Calculate exp(4/8) exp(4/8) ## [1] 1.648721 c. Assign a value of 10 to an object called x x<-(...

773 sym R (452 sym/21 pcs)

Assignment 2

29.09.2020

#Please download the data from Blackboard (Infection_Risk.csv) to answer the following questions. The data set gives a number of characteristics for 113 hospitals across the nation. The original purpose is to understand the factors for infection risk for patients while in the hospital. In this assignment, we primarily use two variables: InfctRsk ...

2422 sym R (2720 sym/28 pcs) 2 img

Lab 9.16.2020

27.09.2020

1. Create the vectors x <- c(5,10,15,20,25,30) y <- c(-1,NA,75,3,5,8) z <- c(5) #2. Multiply the first two vectors by the z vector, and store these in new objects. Print these new vectors xz<- c(x*z) print(xz) ## [1] 25 50 75 100 125 150 yz<- c(y*z) print(yz) ## [1] -5 NA 375 15 25 40 library(haven) ## Warning: package 'haven' was bui...

894 sym R (1424 sym/22 pcs) 2 img

DEM 5273

19.10.2020

#a) Generate a boxplot of poverty rate at the county level (2 points). Based on the boxplot, what is the median poverty rate and the interquartile range (IQR) of the poverty rate? (2 points) What’s the minimum and maximum values for the poverty rate? (4 points) out <- boxplot.stats(PA_Mortality$povrate)$out out<- round(out,digits=1) boxplot(P...

2027 sym R (1904 sym/28 pcs) 1 img

Homework 3

10.11.2020

prb<-read_csv("C:/Users/cs49226/Documents/Fall 2020/Stats/R/PRB2013.csv", col_names=T) ## Parsed with column specification: ## cols( ## .default = col_double(), ## Country = col_character(), ## Continent = col_character(), ## Region = col_character() ## ) ## See spec(...) for full column specifications. names(prb)<-tolower(names(prb...

3198 sym R (5816 sym/41 pcs) 5 img

Merge Practice

02.11.2020

mydata = na.omit(subset(mydata, select=c("seqn","ridreth1", "dmdborn4"))) bpsy = (subset(BPX, select=c("bpxsy1","bpxsy2","bpxsy3", "bpxsy4"))) bpdi = (subset(BPX, select=c("bpxdi1","bpxdi2","bpxdi3","bpxdi4"))) BPX$meansy <- rowMeans(bpsy, na.rm=TRUE) BPX$meandi <- rowMeans(bpdi, na.rm=TRUE) BPX$meansy= ifelse(BPX$meansy >= 140, "Hypertensi...

8 sym R (2839 sym/17 pcs) 3 img

Final

11.12.2020

1). Recode tenure so that 1=owning a house, 0=renting a house, and missing is set to missing (NA). (2 point) psid$tenure[psid$tenure > 7] = NA psid$tenure = ifelse(psid$tenure < 2, "0", "1") 2). Check whether crace3 (child’s race) variable is a factor variable. (1 point) class(psid$crace3) ## [1] "haven_labelled" "vctrs_vctr" "double" lev...

5668 sym R (5662 sym/52 pcs) 5 img

DEM 5093

28.01.2021

--- title: "DEM 5093 HW 2" author: "Christine Thomas" date: "27 January, 2021" output: html_document --- library(tidycensus) library(tidyverse) library(sf) library(ggplot2) v15_Profile <- load_variables(2017 , "acs5/profile", cache = TRUE) #demographic profile tables sa_acs<-get_acs(geography = "tract", state="TX", ...

15 sym R (1279 sym/8 pcs) 1 img

DEM-5093-901

21.01.2021

Christine Thomas csaenz11@gmail.com Use a screen capture tool to take a capture of you R session showing version 4.0.3 ...

131 sym 2 img

hw4

01.03.2021

Homework 4 #load libraries library(car, quietly = T) library(stargazer, quietly = T) ## ## 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, quietly = T) ## ## Attaching package: 'survey' ## T...

833 sym R (10258 sym/49 pcs) 4 img 1 tbl