Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robust sandwich estimator #53

Closed
17 tasks done
danielinteractive opened this issue Jul 3, 2022 · 0 comments · Fixed by #215
Closed
17 tasks done

Robust sandwich estimator #53

danielinteractive opened this issue Jul 3, 2022 · 0 comments · Fixed by #215
Assignees
Labels
enhancement New feature or request SP8

Comments

@danielinteractive
Copy link
Collaborator

danielinteractive commented Jul 3, 2022

To do:

  • Understand and describe what combinations of ST and KR work or don't work from methods point of view with sandwich estimator
  • Check how package clubSandwich does it
    • Especially for gls result objects (since our model is also a general least squares model)
  • Derive formulas for our case -> write design doc
  • Implement prototype calculations
  • Compare for one or two examples with SAS results
  • extend with method here in mmrm package
    • add news
    • add vignettes
    • add both jackknife and empirical
    • a simple "residual" degree of freedom is added; n_obs - n_params to make things run;
    • add unit tests
    • add integration tests
      • compared empirical with SAS result
      • compared Jackknife with nlme::gls + clubSandwich::vcovCR(type = "CR3")
      • compared weighted empirical with SAS
      • compared weighted Jackknife with nlme::gls + clubSandwich::vcovCR(Please note that the weight used in gls is the inverse of the weight used in SAS and mmrm)

Just fyi: Here is some simple example of gls() with clubSandwich - might be nice to play around with

library(nlme)
m <- gls(
  value ~ time*method,
  correlation =corCompSymm(form=~1|patient_id), 
  data = x, 
  na.action = na.omit, 
  method = "REML"
)
 
emmeans::emmeans(
  m, 
  specs = ~time*method,
  vcov = matrix(clubSandwich::vcovCR(m, type = "CR3"), nrow=6)
)
@danielinteractive danielinteractive added enhancement New feature or request SP8 labels Jul 3, 2022
@danielinteractive danielinteractive changed the title Robust sandwich estimator Design for robust sandwich estimator Jul 10, 2022
@danielinteractive danielinteractive removed this from Discuss in mmrm package backlog Aug 17, 2022
@danielinteractive danielinteractive added this to To start in mmrm package board via automation Aug 17, 2022
@clarkliming clarkliming self-assigned this Jan 6, 2023
@clarkliming clarkliming moved this from Issue To start to Issue In progress in mmrm package board Jan 6, 2023
@clarkliming clarkliming changed the title Design for robust sandwich estimator Robust sandwich estimator Jan 13, 2023
mmrm package board automation moved this from Issue In progress to Done Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SP8
Projects
Development

Successfully merging a pull request may close this issue.

2 participants