Publications by Jake Reynolds - August 23, 2020
Module 1 - Weekly Content Review
Using the dataset hsb2.dta, do a detailed summary of the variable progtype (curricular program type) (In R - use the “describe” function from the psych package). Then do a tabulation of progtype using the tab command (or table command in R), both with and without the value labels. Paste the summary and the tabulations below. Which type of des...
3417 sym R (285 sym/6 pcs) 3 img
Module 3 Content Review: The Null Model
library(haven) library(tidyverse) library(Hmisc) library(lme4) library(lmerTest) This week, we will continue using the hsbmerged dataset that we worked with in class. This is a sample of more than 7,000 students nested within 160 schools collected in 1982. Part 1: Reading Achievement We know from the demonstration video that math achievement...
7294 sym R (15054 sym/38 pcs) 2 img
Module 2 Content Review - Regression
Loading Packages for Assignment library(tidyverse) library(knitr) library(haven) #needed to pull data from file location library(ggplot2) library(broom) library(skimr) library(stargazer) You are (hypothetically) interested in the participants’ hourly wages (wage). You have several working hypotheses: that wages differ according to the ...
7785 sym R (14459 sym/21 pcs) 1 img
Module 8, Part 1
Create a new variable, grade_0, which goes from 0-5 instead of 3-8 like our current grade variable does. Why is using a time variable that starts at 0 helpful in interpreting our results? It is helpful to use a time variable that starts with 0 because it is easier to interpret the intercept at 0, than 3. As stated in our text, “the time variab...
10064 sym R (8916 sym/23 pcs)
Module 7: Three Level Models
Run and interpret a null model with math scores gktmathss as the DV, with students clustered within classrooms and schools. How much variation in math scores is at the teacher level? The school level? Which level demonstrates more variability? And how much variability remains at the student level? Variation in Math Scores ICC (Classroom) = 0.126...
19112 sym R (24953 sym/36 pcs)
Module 5: Random Slope Models
Part 1: Run and Interpret Random Intercept Model Treating thk as the DV, and school as the level-2 clustering variable, estimate a conditional random intercept model with prethk, cc, and gprethk as predictors. Interpret the results. Obtain fit statistics (AIC and BIC) for this baseline model. This model shows ‘cc’ and ‘gprethk’ are stat...
14624 sym R (10859 sym/30 pcs) 1 img
Module 4: Conditional Random Intercept Models
This week, we are going to use data from Gavin and Hofmann (2002), a study on organizational climate and attitudes published in Leadership Quarterly. Here, we have individuals soldiers nested within companies. This is the same dataset that Garson uses in Chapter 6, so you can recreate his analysis. Load Some Packages to Help with the Analysis an...
12198 sym R (9721 sym/32 pcs) 1 img
Module 6 Model Fit and Effect Size for Multilevel Models
Part 1: Calculating Multilevel Effect Sizes Run a null model with mathach as the DV, and then run a conditional random intercept model with mathach as the DV and female, ses, size, and sector as IVs. Null Model AIC: 47121.8 BIC: 47142.4 Model.1 with female, ses, size, and sector AIC: 46564.2 BIC: 46612.3 Difference between the null model and Mo...
6283 sym R (8455 sym/18 pcs)
Document
Load in Our MVP Packages suppressPackageStartupMessages(library(tidyverse)) suppressPackageStartupMessages(library(Hmisc)) suppressPackageStartupMessages(library(lme4)) Load in the Data starlong <- haven::read_dta("STAR_long.dta") glimpse(starlong) Rows: 8,826 Columns: 7 $ stdntid <dbl> 10023, 10023, 10023, 10023, ... $ grade <dbl...
2563 sym R (10779 sym/23 pcs)
Module 8, Pt 2
Part 1: Reshape the Data Into Long Format Starting with the wide version of the STAR data (with one row per person), reshape the dataset into long format, where one row represents each observation (multiple rows per person). Use the reshape long command in Stata or pivot_longer function in the dplyr function in R, creating a new variable called ...
9650 sym R (7549 sym/22 pcs)