Closed daijiang closed 6 years ago
Daijiang,
Thanks for catching this. I couldn't make edits to that branch on github, but the code for lines 122-130 should be
if(family(mod)[1] == "binomial") Yhat <- log(mu/(1 - mu)) if(family(mod)[1] == "poisson") Yhat <- log(mu)
sig2e <- pi^2/3 SSE.resid <- sig2e/(var(Yhat) + sig2e)
mu.r <- mod.r$fitted.values if(family(mod.r)[1] == "binomial") Yhat.r <- log(mu.r/(1 - mu.r)) if(family(mod.r)[1] == "poisson") Yhat.r <- log(mu.r)
sig2e.r <- pi^2/3
Tony
Anthony R. Ives UW-Madison 459 Birge Hall 608-262-1519
From: Daijiang Li notifications@github.com Reply-To: arives/rr2 reply@reply.github.com Date: Monday, April 30, 2018 at 11:00 AM To: arives/rr2 rr2@noreply.github.com Cc: "Anthony R. Ives" arives@wisc.edu, Mention mention@noreply.github.com Subject: [arives/rr2] log(v)? (#2)
https://github.com/arives/rr2/blob/9794299f8ff7215002980b7683206ac89a258277/R/r2_resid.R#L122
shouldn't this (and line 130) be log(v)? @ariveshttps://github.com/arives .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/arives/rr2/issues/2, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALF_LDlfQFSfulZl10f9SnzhzAeJbwyzks5ttzUGgaJpZM4Ts0Hz.
9951797
https://github.com/arives/rr2/blob/9794299f8ff7215002980b7683206ac89a258277/R/r2_resid.R#L122
shouldn't this (and line 130, 185, 203, 215) be
log(v)
? @arives .