Do GEE and GLM estimate the same coefficients?












3














In a GLM, the likelihood equations depend on the assumed distribution only through the mean and the variance. The likelihood equations are



$$sum_i^n (frac{partial mu_i}{partial eta_i}) frac{y_i - mu_i}{Var(Y_i)}x_{ij} = 0, quad (j = 1, ..., p)$$



and in the quasi-likelihood case, we just let $Var(Y_i) = v(mu_i)$ be some function of the mean. For GEE, the response is extended to be multivariate, with an assumed correlation structure, with the quasi-likelihood equations.



Does this imply that GEE and GLM will have the same parameter (say $beta$) estimates (population averaged) with the only difference being correct standard errors in the GEE case (Assuming clustered data?)



If the estimated coefficients are not the same, then what is the difference?










share|cite|improve this question



























    3














    In a GLM, the likelihood equations depend on the assumed distribution only through the mean and the variance. The likelihood equations are



    $$sum_i^n (frac{partial mu_i}{partial eta_i}) frac{y_i - mu_i}{Var(Y_i)}x_{ij} = 0, quad (j = 1, ..., p)$$



    and in the quasi-likelihood case, we just let $Var(Y_i) = v(mu_i)$ be some function of the mean. For GEE, the response is extended to be multivariate, with an assumed correlation structure, with the quasi-likelihood equations.



    Does this imply that GEE and GLM will have the same parameter (say $beta$) estimates (population averaged) with the only difference being correct standard errors in the GEE case (Assuming clustered data?)



    If the estimated coefficients are not the same, then what is the difference?










    share|cite|improve this question

























      3












      3








      3







      In a GLM, the likelihood equations depend on the assumed distribution only through the mean and the variance. The likelihood equations are



      $$sum_i^n (frac{partial mu_i}{partial eta_i}) frac{y_i - mu_i}{Var(Y_i)}x_{ij} = 0, quad (j = 1, ..., p)$$



      and in the quasi-likelihood case, we just let $Var(Y_i) = v(mu_i)$ be some function of the mean. For GEE, the response is extended to be multivariate, with an assumed correlation structure, with the quasi-likelihood equations.



      Does this imply that GEE and GLM will have the same parameter (say $beta$) estimates (population averaged) with the only difference being correct standard errors in the GEE case (Assuming clustered data?)



      If the estimated coefficients are not the same, then what is the difference?










      share|cite|improve this question













      In a GLM, the likelihood equations depend on the assumed distribution only through the mean and the variance. The likelihood equations are



      $$sum_i^n (frac{partial mu_i}{partial eta_i}) frac{y_i - mu_i}{Var(Y_i)}x_{ij} = 0, quad (j = 1, ..., p)$$



      and in the quasi-likelihood case, we just let $Var(Y_i) = v(mu_i)$ be some function of the mean. For GEE, the response is extended to be multivariate, with an assumed correlation structure, with the quasi-likelihood equations.



      Does this imply that GEE and GLM will have the same parameter (say $beta$) estimates (population averaged) with the only difference being correct standard errors in the GEE case (Assuming clustered data?)



      If the estimated coefficients are not the same, then what is the difference?







      regression clustering generalized-linear-model estimation gee






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked 4 hours ago









      MarcelMarcel

      403111




      403111






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Yes. GEE and GLM will indeed have the same coefficients, but different standard errors. To check, run an example in R. I've taken this example from Chapter 25 of Applied Regression Analysis and Other Multivariable Methods, 5th by Kleinbaum, et. al (just because it's on my desk and references GEE and GLM):



          library(geepack)
          library(lme4)

          #get book data from
          mydf<-read.table("http://www.hmwu.idv.tw/web/bigdata/rstudio-readData/tab/ch25q04.txt", header=TRUE)
          mydf<-data.frame(subj=mydf$subj, week=as.factor(mydf$week), fev=mydf$fev)
          #Make 5th level the reference level to match book results
          mydf$
          week<-relevel(mydf$week, ref="5")

          #Fit GLM Mixed Model
          mixed.model<-summary(lme4::lmer(fev~week+(1|subj),data=mydf))
          mixed.model$coefficients

          Estimate Std. Error t value
          (Intercept) 6.99850 0.2590243 27.01870247
          week1 2.81525 0.2439374 11.54087244
          week2 -0.15025 0.2439374 -0.61593680
          week3 0.00325 0.2439374 0.01332309
          week4 -0.04700 0.2439374 -0.19267241

          #Fit a gee model with any correlation structure. In this case AR1
          gee.model<-summary(geeglm(fev~week, id=subj, waves=week, corstr="ar1", data=mydf))
          gee.model$coefficients

          [Estimate Std.err Wald Pr(>|W|)
          (Intercept) 6.99850 0.2418413 8.374312e+02 0.0000000
          week1 2.81525 0.2514376 1.253642e+02 0.0000000
          week2 -0.15025 0.2051973 5.361492e-01 0.4640330
          week3 0.00325 0.2075914 2.451027e-04 0.9875090
          week4 -0.04700 0.2388983 3.870522e-02 0.8440338][1]


          Note the first and second columns of the output in each model. They coefficients are identity, but standard errors differ.






          share|cite|improve this answer

















          • 1




            And does this remain the case when we choose a non-linear link function?
            – Marcel
            3 hours ago










          • The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
            – Mark White
            2 hours ago












          • @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
            – Marcel
            1 hour ago











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "65"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f386443%2fdo-gee-and-glm-estimate-the-same-coefficients%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Yes. GEE and GLM will indeed have the same coefficients, but different standard errors. To check, run an example in R. I've taken this example from Chapter 25 of Applied Regression Analysis and Other Multivariable Methods, 5th by Kleinbaum, et. al (just because it's on my desk and references GEE and GLM):



          library(geepack)
          library(lme4)

          #get book data from
          mydf<-read.table("http://www.hmwu.idv.tw/web/bigdata/rstudio-readData/tab/ch25q04.txt", header=TRUE)
          mydf<-data.frame(subj=mydf$subj, week=as.factor(mydf$week), fev=mydf$fev)
          #Make 5th level the reference level to match book results
          mydf$
          week<-relevel(mydf$week, ref="5")

          #Fit GLM Mixed Model
          mixed.model<-summary(lme4::lmer(fev~week+(1|subj),data=mydf))
          mixed.model$coefficients

          Estimate Std. Error t value
          (Intercept) 6.99850 0.2590243 27.01870247
          week1 2.81525 0.2439374 11.54087244
          week2 -0.15025 0.2439374 -0.61593680
          week3 0.00325 0.2439374 0.01332309
          week4 -0.04700 0.2439374 -0.19267241

          #Fit a gee model with any correlation structure. In this case AR1
          gee.model<-summary(geeglm(fev~week, id=subj, waves=week, corstr="ar1", data=mydf))
          gee.model$coefficients

          [Estimate Std.err Wald Pr(>|W|)
          (Intercept) 6.99850 0.2418413 8.374312e+02 0.0000000
          week1 2.81525 0.2514376 1.253642e+02 0.0000000
          week2 -0.15025 0.2051973 5.361492e-01 0.4640330
          week3 0.00325 0.2075914 2.451027e-04 0.9875090
          week4 -0.04700 0.2388983 3.870522e-02 0.8440338][1]


          Note the first and second columns of the output in each model. They coefficients are identity, but standard errors differ.






          share|cite|improve this answer

















          • 1




            And does this remain the case when we choose a non-linear link function?
            – Marcel
            3 hours ago










          • The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
            – Mark White
            2 hours ago












          • @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
            – Marcel
            1 hour ago
















          2














          Yes. GEE and GLM will indeed have the same coefficients, but different standard errors. To check, run an example in R. I've taken this example from Chapter 25 of Applied Regression Analysis and Other Multivariable Methods, 5th by Kleinbaum, et. al (just because it's on my desk and references GEE and GLM):



          library(geepack)
          library(lme4)

          #get book data from
          mydf<-read.table("http://www.hmwu.idv.tw/web/bigdata/rstudio-readData/tab/ch25q04.txt", header=TRUE)
          mydf<-data.frame(subj=mydf$subj, week=as.factor(mydf$week), fev=mydf$fev)
          #Make 5th level the reference level to match book results
          mydf$
          week<-relevel(mydf$week, ref="5")

          #Fit GLM Mixed Model
          mixed.model<-summary(lme4::lmer(fev~week+(1|subj),data=mydf))
          mixed.model$coefficients

          Estimate Std. Error t value
          (Intercept) 6.99850 0.2590243 27.01870247
          week1 2.81525 0.2439374 11.54087244
          week2 -0.15025 0.2439374 -0.61593680
          week3 0.00325 0.2439374 0.01332309
          week4 -0.04700 0.2439374 -0.19267241

          #Fit a gee model with any correlation structure. In this case AR1
          gee.model<-summary(geeglm(fev~week, id=subj, waves=week, corstr="ar1", data=mydf))
          gee.model$coefficients

          [Estimate Std.err Wald Pr(>|W|)
          (Intercept) 6.99850 0.2418413 8.374312e+02 0.0000000
          week1 2.81525 0.2514376 1.253642e+02 0.0000000
          week2 -0.15025 0.2051973 5.361492e-01 0.4640330
          week3 0.00325 0.2075914 2.451027e-04 0.9875090
          week4 -0.04700 0.2388983 3.870522e-02 0.8440338][1]


          Note the first and second columns of the output in each model. They coefficients are identity, but standard errors differ.






          share|cite|improve this answer

















          • 1




            And does this remain the case when we choose a non-linear link function?
            – Marcel
            3 hours ago










          • The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
            – Mark White
            2 hours ago












          • @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
            – Marcel
            1 hour ago














          2












          2








          2






          Yes. GEE and GLM will indeed have the same coefficients, but different standard errors. To check, run an example in R. I've taken this example from Chapter 25 of Applied Regression Analysis and Other Multivariable Methods, 5th by Kleinbaum, et. al (just because it's on my desk and references GEE and GLM):



          library(geepack)
          library(lme4)

          #get book data from
          mydf<-read.table("http://www.hmwu.idv.tw/web/bigdata/rstudio-readData/tab/ch25q04.txt", header=TRUE)
          mydf<-data.frame(subj=mydf$subj, week=as.factor(mydf$week), fev=mydf$fev)
          #Make 5th level the reference level to match book results
          mydf$
          week<-relevel(mydf$week, ref="5")

          #Fit GLM Mixed Model
          mixed.model<-summary(lme4::lmer(fev~week+(1|subj),data=mydf))
          mixed.model$coefficients

          Estimate Std. Error t value
          (Intercept) 6.99850 0.2590243 27.01870247
          week1 2.81525 0.2439374 11.54087244
          week2 -0.15025 0.2439374 -0.61593680
          week3 0.00325 0.2439374 0.01332309
          week4 -0.04700 0.2439374 -0.19267241

          #Fit a gee model with any correlation structure. In this case AR1
          gee.model<-summary(geeglm(fev~week, id=subj, waves=week, corstr="ar1", data=mydf))
          gee.model$coefficients

          [Estimate Std.err Wald Pr(>|W|)
          (Intercept) 6.99850 0.2418413 8.374312e+02 0.0000000
          week1 2.81525 0.2514376 1.253642e+02 0.0000000
          week2 -0.15025 0.2051973 5.361492e-01 0.4640330
          week3 0.00325 0.2075914 2.451027e-04 0.9875090
          week4 -0.04700 0.2388983 3.870522e-02 0.8440338][1]


          Note the first and second columns of the output in each model. They coefficients are identity, but standard errors differ.






          share|cite|improve this answer












          Yes. GEE and GLM will indeed have the same coefficients, but different standard errors. To check, run an example in R. I've taken this example from Chapter 25 of Applied Regression Analysis and Other Multivariable Methods, 5th by Kleinbaum, et. al (just because it's on my desk and references GEE and GLM):



          library(geepack)
          library(lme4)

          #get book data from
          mydf<-read.table("http://www.hmwu.idv.tw/web/bigdata/rstudio-readData/tab/ch25q04.txt", header=TRUE)
          mydf<-data.frame(subj=mydf$subj, week=as.factor(mydf$week), fev=mydf$fev)
          #Make 5th level the reference level to match book results
          mydf$
          week<-relevel(mydf$week, ref="5")

          #Fit GLM Mixed Model
          mixed.model<-summary(lme4::lmer(fev~week+(1|subj),data=mydf))
          mixed.model$coefficients

          Estimate Std. Error t value
          (Intercept) 6.99850 0.2590243 27.01870247
          week1 2.81525 0.2439374 11.54087244
          week2 -0.15025 0.2439374 -0.61593680
          week3 0.00325 0.2439374 0.01332309
          week4 -0.04700 0.2439374 -0.19267241

          #Fit a gee model with any correlation structure. In this case AR1
          gee.model<-summary(geeglm(fev~week, id=subj, waves=week, corstr="ar1", data=mydf))
          gee.model$coefficients

          [Estimate Std.err Wald Pr(>|W|)
          (Intercept) 6.99850 0.2418413 8.374312e+02 0.0000000
          week1 2.81525 0.2514376 1.253642e+02 0.0000000
          week2 -0.15025 0.2051973 5.361492e-01 0.4640330
          week3 0.00325 0.2075914 2.451027e-04 0.9875090
          week4 -0.04700 0.2388983 3.870522e-02 0.8440338][1]


          Note the first and second columns of the output in each model. They coefficients are identity, but standard errors differ.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered 4 hours ago









          StatsStudentStatsStudent

          4,98332042




          4,98332042








          • 1




            And does this remain the case when we choose a non-linear link function?
            – Marcel
            3 hours ago










          • The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
            – Mark White
            2 hours ago












          • @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
            – Marcel
            1 hour ago














          • 1




            And does this remain the case when we choose a non-linear link function?
            – Marcel
            3 hours ago










          • The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
            – Mark White
            2 hours ago












          • @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
            – Marcel
            1 hour ago








          1




          1




          And does this remain the case when we choose a non-linear link function?
          – Marcel
          3 hours ago




          And does this remain the case when we choose a non-linear link function?
          – Marcel
          3 hours ago












          The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
          – Mark White
          2 hours ago






          The OP asked about a GLM, however, not a mixed GLM, correct? So it should be glm(fev ~ week) vs the geeglm. In that case, the GEE and GLM will agree, ut but differ in standard errors. This isn't necessarily the case for a multilevel model; see an example in a question I posted when the parameters of a multilevel model don't have anywhere near the same coefficients as a GEE: stats.stackexchange.com/questions/358231/…
          – Mark White
          2 hours ago














          @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
          – Marcel
          1 hour ago




          @MarkWhite nice catch, I didn't even notice he was fitting a mixed effects model. It is curious that they have the same coefficients, since I was under the impression that GLMM and GEE do not produce equivalent estimates, as you said.
          – Marcel
          1 hour ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Cross Validated!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f386443%2fdo-gee-and-glm-estimate-the-same-coefficients%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido