We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a working correlation structure is used in geeglm or geese the resulting correlation estimates can be outside [-1,1].
geeglm
geese
Ideally this should never happen. But until this can be corrected a warning should be created so the user is alerted to any potential problem.
library(MASS) library(geepack) library(tidyr) generate_data <- function(nobs = 100) { sig <- matrix(data = c(1, 0.5, 0.5, 0.5, 1, 0.9, 0.5, 0.9, 1), nrow = 3, ncol = 3) y <- mvrnorm(n = nobs, mu = c(0, 0, 0), Sigma = sig) dat <- data.frame(id = factor(1:nobs), y1 = y[,1], y2 = y[,2], y3 = y[,3]) pivot_longer(dat, cols = c(y1, y2, y3), names_to = "Time", values_to = "vals") } set.seed(3045) simdat <- generate_data(100) mod <- geeglm(vals ~ 1, id = id, data = simdat, corstr = "unstructured") summary(mod) #> #> Call: #> geeglm(formula = vals ~ 1, data = simdat, id = id, corstr = "unstructured") #> #> Coefficients: #> Estimate Std.err Wald Pr(>|W|) #> (Intercept) 0.1008 0.0841 1.437 0.231 #> #> Correlation structure = unstructured #> Estimated Scale Parameters: #> #> Estimate Std.err #> (Intercept) 1.083 0.1374 #> Link = identity #> #> Estimated Correlation Parameters: #> Estimate Std.err #> alpha.1:2 0.4274 0.07357 #> alpha.1:3 0.4448 0.06583 #> alpha.2:3 1.1153 0.04518 #> Number of clusters: 100 Maximum cluster size: 3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When a working correlation structure is used in
geeglm
orgeese
the resulting correlation estimates can be outside [-1,1].Ideally this should never happen. But until this can be corrected a warning should be created so the user is alerted to any potential problem.
The text was updated successfully, but these errors were encountered: