October 6, 2009 Session 6Slide 1 PSC 5940: Running Basic Multi- Level Models in R Session 6 Fall, 2009.

Slides:



Advertisements
Similar presentations
DC Responses Received WA OR ID MT WY CA NV UT CO AZ NM AK HI TX ND SD NE KS OK MN IA MO AR LA WI IL MI IN OH KY TN MS AL GA FL SC NC VA WV PA NY VT NH.
Advertisements

Background Information on the Newspoets Total Number: 78 active newspoets. 26 (of the original 36) newspoets from returned this year.
NICS Index State Participation As of 12/31/2007 DC NE NY WI IN NH MD CA NV IL OR TN PA CT ID MT WY ND SD NM KS TX AR OK MN OH WV MSAL KY SC MO ME MA DE.
Agencies’ Participation in PBMS January 20, 2015 PA IL TX AZ CA Trained, Partial Data Entry (17) Required Characteristics & 75% of Key Indicators (8) OH.
Essential Health Benefits Benchmark Plan Selection, as of October 2012
Uninsured Non-Elderly Adult Rate Increased from 17. 8% to 20
Medicaid Eligibility for Working Parents by Income, January 2013
House Price
Train-the-Trainer Sessions 240 sessions with 8,187 participants
House price index for AK
WY WI WV WA VA VT UT TX TN SD SC RI PA OR* OK OH ND NC NY NM* NJ NH
Children's Eligibility for Medicaid/CHIP by Income, January 2013
Medicaid Income Eligibility Levels for Other Adults, January 2017
NJ WY WI WV WA VA VT UT TX TN SD SC RI PA OR OK OH ND NC NY NM NH NV
Train-the-Trainer Sessions 384 sessions with 11,279 participants
Comprehensive Medicaid Managed Care Models in the States, 2014
Medicaid Costs are Shared by the States and the Federal Government
Expansion states with Republican governors outnumber expansion states with Democratic governors, May 2018 WY WI WV◊ WA VA^ VT UT TX TN SD SC RI PA OR OK.
Expansion states with Republican governors outnumber expansion states with Democratic governors, January WY WI WV◊ WA VA VT UT TX TN SD SC RI PA.
Share of Births Covered by Medicaid, 2006
Non-Citizen Population, by State, 2011
Status of State Medicaid Expansion Decisions
Share of Women Ages 18 – 64 Who Are Uninsured, by State,
Coverage of Low-Income Adults by Scope of Coverage, January 2013
WY WI WV WA VA VT UT TX TN1 SD SC RI PA1 OR OK OH ND NC NY NM NJ NH2
WY WI WV WA VA VT UT TX TN1 SD SC RI PA OR OK OH1 ND NC NY NM NJ NH NV
WY WI WV WA VA* VT UT TX TN SD SC RI PA OR* OK OH ND NC NY NM* NJ NH
WY WI WV WA VA VT UT TX TN SD SC RI PA OR* OK OH ND NC NY NM* NJ NH
Mobility Update and Discussion as of March 25, 2008
Current Status of the Medicaid Expansion Decision, as of May 30, 2013
IAH CONVERSION: ELIGIBLE BENEFICIARIES BY STATE
WAHBE Brokers / QHPs across the country as of
619 Involvement in State SSIPs
State Health Insurance Marketplace Types, 2015
State Health Insurance Marketplace Types, 2018
HHGM CASE WEIGHTS Early/Late Mix (Weighted Average)
Status of State Medicaid Expansion Decisions
Status of State Participation in Medicaid Expansion, as of March 2014
Percent of Women Ages 19 to 64 Uninsured by State,
Status of State Medicaid Expansion Decisions
Sampling Distribution of a Sample Mean
Medicaid Income Eligibility Levels for Parents, January 2017
State Health Insurance Marketplace Types, 2017
S Co-Sponsors by State – May 23, 2014
WY WI WV WA VA VT UT* TX TN SD SC RI PA OR* OK OH ND NC NY NM* NJ NH
Seventeen States Had Higher Uninsured Rates Than the National Average in 2013; Of Those, 11 Have Yet to Expand Eligibility for Medicaid AK NH WA VT ME.
Employer Premiums as Percentage of Median Household Income for Under-65 Population, 2003 and percent of under-65 population live where premiums.
Employer Premiums as Percentage of Median Household Income for Under-65 Population, 2003 and percent of under-65 population live where premiums.
Average annual growth rate
Train-the-Trainer Sessions 250 sessions with 8,352 participants
Uninsured Rate Among Adults Ages 19–64, 2008–09 and 2019
Percent of Children Ages 0–17 Uninsured by State
Executive Activity on the Medicaid Expansion Decision, May 9, 2013
How State Policies Limiting Abortion Coverage Changed Over Time
Post-Reform: Projected Percent of Adults Ages 19–64 Uninsured by State
United States: age distribution family households and family size
Status of State Medicaid Expansion Decisions
Employer Premiums as Percentage of Median Household Income for Under-65 Population, 2003 and percent of under-65 population live where premiums.
Percent of Adults Ages 18–64 Uninsured by State
Uninsured Nonelderly Adult Rate Has Increased from Percent to 20
States including quality standards in their SSIP improvement strategies for Part C FFY 2013 ( ) States including quality standards in their SSIP.
Status of State Medicaid Expansion Decisions
WY WI WV WA VA VT UT* TX TN SD SC RI PA OR* OK OH ND NC NY NM* NJ NH
WY WI WV WA VA VT UT* TX TN SD SC RI PA OR* OK OH ND NC NY NM* NJ NH
States including their fiscal systems in their SSIP improvement strategies for Part C FFY 2013 ( ) States including their fiscal systems in their.
Current Status of State Individual Marketplace and Medicaid Expansion Decisions, as of September 30, 2013 WY WI WV WA VA VT UT TX TN SD SC RI PA OR OK.
Status of State Medicaid Expansion Decisions
Income Eligibility Levels for Children in Medicaid/CHIP, January 2017
WY WI WV WA VA VT UT TX TN SD SC RI PA OR OK OH ND NC NY NM NJ NH NV
Train-the-Trainer Sessions 386 sessions with 11,336 participants
Presentation transcript:

October 6, 2009 Session 6Slide 1 PSC 5940: Running Basic Multi- Level Models in R Session 6 Fall, 2009

October 6, 2009 Session 6Slide 2 Running Multilevel Models in R Using lmer: “linear mixed-effects in R” Identify a grouping variable: “state” levels(state) # will show the categories: > levels(state) [1] "AK" "AL" "AR" "AZ" "CA" "CO" "CT" "DC" "DE" "FL" "GA" [12] "HI" "IA" "ID" "IL" "IN" "KS" "KY" "LA" "MA" "MD" "ME" [23] "MI" "MN" "MO" "MS" "MT" "NC" "ND" "NE" "NH" "NJ" "NM" [34] "NV" "NY" "OH" "OK" "OR" "PA" "RI" "SC" "SD" "TN" "TX" [45] "UT" "VA" "VT" "WA" "WI" "WV" "WY” Texas is element #44; Oklahoma is element #37; etc.

October 6, 2009 Session 6Slide 3 Running Multilevel Models in R Re-name some variables for analysis income<-e130e_co educ<-e2b_edu Run a simple linear model for comparison: OLS1<-lm(income ~ educ) lm(formula = income ~ educ) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) e-13 *** educ < 2e-16 *** --- Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: on 1506 degrees of freedom (190 observations deleted due to missingness) Multiple R-squared: ,Adjusted R-squared: F-statistic: on 1 and 1506 DF, p-value: < 2.2e-16

October 6, 2009 Session 6Slide 4 Running Multilevel Models in R For a simple-minded intercept-varying model (with no slope coefficients): ML1<-lmer(income ~ 1 + (1 | state)) Formula: income ~ 1 + (1 | state) AIC BIC logLik deviance REMLdev Random effects: Groups Name Variance Std.Dev. state (Intercept) Residual Number of obs: 1513, groups: state, 51 Fixed effects: Estimate Std. Error t value (Intercept)

October 6, 2009 Session 6Slide 5 Running Multilevel Models in R To see the fixed effect: fixef(ML1) Returns the average intercept: ranef(ML1) Returns the variation for each state around the mean intercept: $state (Intercept) AK AL AR AZ CA CO (etc.)

October 6, 2009 Session 6Slide 6 Running Multilevel Models in R A somewhat more interesting ML model: ML2<-lmer(income ~ educ + (1 | state)) Returns a model with a fixed slope and varying intercepts. Summary gets you this: Formula: income ~ educ + (1 | state) AIC BIC logLik deviance REMLdev Random effects: Groups Name Variance Std.Dev. state (Intercept) Residual Number of obs: 1508, groups: state, 51 Fixed effects: Estimate Std. Error t value (Intercept) educ

October 6, 2009 Session 6Slide 7 Running Multilevel Models in R To observe the model estimates: fixef(ML2): (Intercept) educ ranef(ML2): Calculation of the intercept for Texas (46 th state): coef(ML2)$state[46,1], returns: [1] $state (Intercept) AK e-02 AL e-01 AR e-01 AZ e-01 CA e-01 CO e-02 CT e-01

October 6, 2009 Session 6Slide 8 Running Multilevel Models in R To calculate the 95% confidence interval for Texas: coef(ML2)$state[46,1]+c(-2,2)*se.ranef(ML2)$state[46][1] The 95% confidence interval for the model slope is: fixef(ML2)["educ"]+c(-2,2)*se.fixef(ML2)["educ"] which returns: [1]

October 6, 2009 Session 6Slide 9 Running Multilevel Models in R A still more interesting ML model: ML2<-lmer(income ~ educ + (1 + educ | state)) Returns a model with both a varying slope and intercept for each state. Summary gets you this: Formula: income ~ educ + (1 + educ | state) AIC BIC logLik deviance REMLdev Random effects: Groups Name Variance Std.Dev. Corr state (Intercept) educ Residual Number of obs: 1508, groups: state, 51 Fixed effects: Estimate Std. Error t value (Intercept) educ

October 6, 2009 Session 6Slide 10 Running Multilevel Models in R To observe the model estimates: fixef(ML3): (Intercept) educ ranef(ML3): Calculation of the intercept and slopes for Texas: coef(ML3)$state[46,1], returns: [1] coef(ML3)$state[46,2], returns: [2] $state (Intercept) educ AK AL AR AZ CA CO CT

October 6, 2009 Session 6Slide 11 Workshop 1: Build ML Model using Ideology to Predict GHG Risk Use the state variable as the group level How much is the model residual reduced by allowing states to vary? Present it to me in 20 min.

October 6, 2009 Session 6Slide 12 BREAK

October 6, 2009 Session 6Slide 13 Workshop 2: Data presentations Sources, characteristics Preliminary group-level models?

October 6, 2009 Session 6Slide 14 For Next Week Read Gelman & Hill Ch. 13 Build plots: Figure out how to replicate Figure 12.4 (p. 257) code is shown on p Present your initial group-level models