add Evan's intense procedure code to repo
Spouse - main dataset

Bring in claims dod to main dataset
Now use claims dod if hrs dod is missing when carrying through to medicare use
variables to get chronic conditions, comorbidities, medicare use varaibles
The medicare use variables are now = . if no ffs medicare 6m prior to death
This isn't done with the elix comorb, cc's or intensive procedures though,
they are missing only if no xwalk
Spouse factors - overall sample char, update tables, models

Added table for overall sample characteristics for presentation
Added detailed table on the education variables for S, R and dyad
Ran a version of output including those with sudden death, then commented
this out since it won't be used anywhere
Final logit models have standard errors clustered by HRR
S intens pro - More data setup, univ table fix

Added variables for interview timing and some other indicators for categorical variables
Updated univariate table so it runs
Surgery - test

test change to check git, file saving on server
S intens pro - tables

Added new table for overall sample characteristics
Work on intervie wtime veraibles for tables
S intens pro - tables, added multivar model

Added detailed table re n1 vs n2 ivw requirement to the sample description table output
Added logit multivariate regression for outcomes, creates output word table
S intens pro - added model for cesd change outcome

linear regression on outcome of cesd change score
S mc link - added ffs indicators 12m and 24m

Added indicators for spouse parts a & b and HMO looking 12m and 24m preceding
R's death. Updated so for all of these variables, if the dod is missing in the HRS
data, use the claims dod where present
Updated the sample size table to reflect these additional possible cutoffs
S mc link - more work

Pull claims lists and dx lists before and after R's death for 3 time windows
6m, 12m and 24m
Started coding for Elixhauser comorbidities, but this needs some work before it will run
S Intens Pro - added correlation check

To the logit, multivariate models section
S intens pro - first pass propensity score

Set up an initial propensity score model
need to verify variables with KO
S claims - created data subfolders

created subfolders for working and final data
updated filepaths in the code
S mc link - elix

got elixhauser comorbidities to run, added to main s claims dataset
run 6 sets of variables, 6, 12 and 24m pre and post r's death
S claims - chronic conditions

added code for data warehouse chronic conditions
6, 12, 24m pre and post r's death
added to main s claims dataset
S claims - started getting medpar costs

Have costs split by snf and ip claims for periods before R's death
Probably want to add utilization measures here too
Need to do the costs post-death
spouse - main dataset, added 6m hospice use

Added variable for hospice los last 6m of life for R to the main spouse
dataset, this will be used in the intensive procedures project
S intens pro - hospice use vs intens pro

For sample definition, use hospice use last 6m of life
crosstab table added to output to check overlap of the two groups
Spouse - main dataset, add hospice enrollment date for R

Adds start date of R's first hospice claim in last 2 years of life to the main
spouse dataset
S - get first intensive procedure date, excl hemodialysis

Updated spouse main code to pull in first intensive procedure date excluding
hemodialysis procedures. Added check of time from intensive procedure to hospice
enrollment to the variable cleaning step in the spouse intensive code