cleaning models and updating rdd

This commit is contained in:
Matthew Gaughan 2024-05-10 17:46:45 -05:00
parent de600e63a3
commit 735923f414
6 changed files with 4 additions and 2 deletions

View File

@ -137,9 +137,11 @@ D_df_ranef |>
all_residuals <- residuals(all_model)
qqnorm(all_residuals)
# mrg behavior for this
mrg_model <- lmer(log1p_count ~ D * I(week_offset)+ scaled_project_age + (D * I(week_offset)| upstream_vcs_link), data=all_actions_data, REML=FALSE, control = lmerControl(
optimizer ='optimx', optCtrl=list(method='L-BFGS-B')))
mrg_actions_data$log1p_count <- log1p(mrg_actions_data$count)
mrg_model <- glmer.nb(log1p_count ~ D * week_offset + scaled_project_age + (D * week_offset | upstream_vcs_link),
control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=2e5)), data=mrg_actions_data)
summary(mrg_model)
saveRDS(mrg, "0510_rm_mrg.rda")
#identifying the quartiles of effect for D
mrg_model_ranef <- ranef(mrg_model, condVar=TRUE)
df_mrg_ranefs <- as.data.frame(mrg_model_ranef)