Publications by Corey Sparks, PhD

Covid-19 Rate Analysis

08.04.2020

library(dplyr) library(tigris) options(tigris_class = "sf") library(tidycensus) library(data.table) library(tidyquant) library(ggplot2) Spatial data cos<-counties(state="TX", cb=T) cos$fips<-as.numeric(cos$GEOID) Population estimates data coests<-get_estimates(geography="county", year=2018, product = "population", output = "wide") head(coests) ...

254 sym R (11071 sym/19 pcs) 5 img

Demography Informal Methods Seminar Series - Lasso and regularization

23.06.2020

Regularization in Regression I would suggest you read Chapter 6 and especially section 6.2 of An Introduction to Statistical Learning to get a full treatment of this topic. If you want to read the sources for the Lasso, check out the paper by Friedman, Hastie and Tibshirani (2010) Why do I want to talk about this? The Lasso and regularization are...

8693 sym R (24450 sym/93 pcs) 14 img 1 tbl

Demography Informal Methods Seminar Series – Introduction to R

16.06.2020

Welcome to R. R is an interpreted languages, not a compiled one. This means, you type something into R and it does it. If you’re coming to R from SAS, there is no data step. There are no procs. The SAS and R book is very useful for going between the two programs. If you’re coming from SPSS and you’ve been using the button clicking method, b...

18893 sym R (11712 sym/132 pcs) 16 img 1 tbl

Demography Informal Methods Seminar Series - Lasso and regularization

22.06.2020

Regularization in Regression I would suggest you read Chapter 6 and especially section 6.2 of An Introduction to Statistical Learning to get a full treatment of this topic. If you want to read the sources for the Lasso, check out the paper by Friedman, Hastie and Tibshirani (2010) Why do I want to talk about this? The Lasso and regularization are...

8633 sym R (23355 sym/96 pcs) 14 img 1 tbl

Demography Informal Methods Seminar - Introduction to Time Series Analysis

14.07.2020

Time Series Analysis I would suggest you read chapters 1 through 3 of Time Series Analysis and Its Applications 4th ed to get a introductory treatment of this topic. I also strongly urge you to check out Rob Hyndman’s book on forecasting, which is free. In time series analysis, we are typically interested in describing the pattern of variation ...

9276 sym R (12921 sym/78 pcs) 38 img

Demography Informal Methods Seminar - Classification Trees

30.06.2020

Classification models I would suggest you read section 5.1 of Introduction to Statistical Learning to get a full treatment of this topic In classification methods, we are typically interested in using some observed characteristics of a case to predict a binary categorical outcome. This can be extended to a multi-category outcome, but the largest ...

9896 sym R (26659 sym/109 pcs) 21 img

Demography Informal Methods Seminar - Population Projection and the Lee-Carter Model

21.07.2020

Population Projection One of the most fundamental forms of demographic analysis Uses age-structured rates of fertility and mortality to project the population structure forward into time Shows patterns of population growth and age composition in future populations Further analysis can show population growth rates and sensitivity of the growth ra...

5226 sym R (27897 sym/99 pcs) 23 img

DEM 5093/7093 Lab 1 using R - Basic Map making

27.01.2021

Get a Census developer API Key Obtain one at http://api.census.gov/data/key_signup.html Save your API key to your working directory use tidycensus::census_api_key(key = "yourkeyhere", install = T) one time to install your key for use in tidycensus library(tidycensus) library(tidyverse) library(sf) library(ggplot2) v15_Profile <- load_variab...

983 sym R (4856 sym/17 pcs) 5 img

DEM 7093 H1 Example

21.01.2021

Corey Sparks corey.sparks@utsa.edu Use a screen capture tool to take a capture of you R session showing version 4.0.3 ...

129 sym 1 img

DEM 5093/7093 Lab 2 using R - Map projections and transformations

03.02.2021

library(tidycensus, quietly = T) library(sf, quietly = T) library(dplyr, quietly = T) Read in Bexar county tracts sa_acs<-get_acs(geography = "tract", state = "TX", county = "Bexar", year = 2017, variables = c("DP05_0001E", "DP03_0119PE"), geometry = T, ...

834 sym R (2066 sym/8 pcs)