Glance accepts a model object and returns a tibble::tibble() with exactly one row of model summaries. The summaries are typically goodness of fit measures, p-values for hypothesis tests on residuals, or model convergence information.

Glance never returns information from the original call to the modeling function. This includes the name of the modeling function or any arguments passed to the modeling function.

Glance does not calculate summary measures. Rather, it farms out these computations to appropriate methods and gathers the results together. Sometimes a goodness of fit measure will be undefined. In these cases the measure will be reported as NA.

Glance returns the same number of columns regardless of whether the model matrix is rank-deficient or not. If so, entries in columns that no longer have a well-defined value are filled in with an NA of the appropriate type.

# S3 method for geeglm
glance(x, ...)

Arguments

x

A geeglm object returned from a call to geepack::geeglm().

...

Additional arguments. Not used. Needed to match generic signature only. Cautionary note: Misspelled arguments will be absorbed in ..., where they will be ignored. If the misspelled argument has a default value, the default value will be used. For example, if you pass conf.lvel = 0.9, all computation will proceed using conf.level = 0.95. Additionally, if you pass newdata = my_tibble to an augment() method that does not accept a newdata argument, it will use the default value for the data argument.

See also

Value

A tibble::tibble() with exactly one row and columns:

alpha

Estimated correlation parameter for geepack::geeglm.

df.residual

Residual degrees of freedom.

gamma

Estimated scale parameter for geepack::geeglm.

max.cluster.size

Max number of elements in clusters.

n.clusters

Number of clusters.

Examples


if (requireNamespace("geepack", quietly = TRUE)) {

library(geepack)
data(state)

ds <- data.frame(state.region, state.x77)

geefit <- geeglm(Income ~ Frost + Murder,
  id = state.region,
  data = ds, family = gaussian,
  corstr = "exchangeable"
)

tidy(geefit)
tidy(geefit, conf.int = TRUE)

}
#> $fct
#> function(dose, parm)
#>     {
#>         parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE)
#>         parmMat[, notFixed] <- parm
#>         fd(dose, parmMat[, 1], parmMat[, 2], parmMat[, 3], parmMat[, 4], parmMat[, 5])
#>     }
#> <bytecode: 0x55bef4906c20>
#> <environment: 0x55bef9849428>
#> 
#> $ssfct
#> function(dframe)
#>     {
#>         x <- dframe[, 1]
#>         y <- dframe[, 2]
#> 
#>         ## Finding initial values for c and d parameters
#>         cdVal <- findcd(x, y)
#>         if (useFixed) {}  # not implemented at the moment        
#>     
#>         ## Finding initial values for b, e, and f parameters 
#>         if (logg) 
#>         {
#>             bVal <- 0.75 * sd(log(x[y > quantile(y, .75)]))
#>         } else {
#>             bVal <- 0.75 * sd(x[y > quantile(y, .75)])
#>         }   
#>         befVal <- c(bVal, x[which.max(y)], 1)
#> #        befVal <- c(sd(x), mean(x), 1)
#> 
#>         return(c(befVal[1], cdVal, befVal[2:3])[is.na(fixed)])
#>     }
#> <bytecode: 0x55befcb76b18>
#> <environment: 0x55beff845550>
#> 
#> $names
#> [1] "b" "c" "d" "e" "f"
#> 
#> $deriv1
#> function(dose, parm)
#>     {
#>         parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE)
#>         parmMat[, notFixed] <- parm
#>         attr(fd(dose, parmMat[, 1], parmMat[, 2], parmMat[, 3], parmMat[, 4], parmMat[, 5]), "gradient")[, notFixed]
#>     }
#> <bytecode: 0x55bef4910b78>
#> <environment: 0x55bef9849428>
#> 
#> $deriv2
#> NULL
#> 
#> $derivx
#> function(dose, parm)
#>     {
#>         parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE)
#>         parmMat[, notFixed] <- parm
#> 
#>         dFct <- function (dose, b, c, d, e, f)
#>         {
#>             .expr1 <- d - c
#>             .expr4 <- (dose - e)/b
#>             .expr5 <- .expr4^2
#>             .expr6 <- sqrt(.expr5)
#>             .expr9 <- exp(-0.5 * .expr6^f)
#>             .value <- c + .expr1 * .expr9
#>             .grad <- array(0, c(length(.value), 1L), list(NULL, c("dose")))
#>             .grad[, "dose"] <- -(.expr1 * (.expr9 * (0.5 * (.expr6^(f - 1) * (f * (0.5 * (2 * (1/b * .expr4) * .expr5^-0.5)))))))
#>             attr(.value, "gradient") <- .grad
#>             .value
#>         }
#>         attr(dFct(dose, parmMat[, 1], parmMat[, 2], parmMat[, 3], parmMat[, 4], parmMat[, 5]), "gradient")
#>     }
#> <bytecode: 0x55bef491c6d0>
#> <environment: 0x55bef9849428>
#> 
#> $edfct
#> function(parm, respl, reference, type, ...)
#>     {
#>         parmVec[notFixed] <- parm
#> #        if (type == "absolute")
#> #        {
#> #            p <- 100*((parmVec[3] - respl)/(parmVec[3] - parmVec[2]))
#> #        } else {
#> #            p <- respl
#> #        }
#> #        if ( (parmVec[1] < 0) && (reference == "control") )
#> #        {
#> #            p <- 100 - p
#> #        }
#>         p <- absToRel(parmVec, abs(respl), type)
#> 
#>         ## Reversing p
#>         if (identical(type, "absolute"))
#>         {
#>             p <- 100 - p
#>         }
#>         if (identical(type, "relative") && (parmVec[1] < 0) && (reference == "control"))
#>         {
#>             p <- 100 - p
#>         }
#> 
#>         pProp <- 1 - (100-p) / 100
#> 
#>         ## deriv(~b*(-2*22)^(1 / f)+e, c("b", "c", "d", "e", "f"), function(b,c,d,e,f){})
#>         ## using "22" insted of log(pProp)
#>         EDfct <- function (b, c, d, e, f) 
#>         {
#> #            .expr2 <- -2 * 22
#>             .expr2 <- -2 * log(pProp)
#>             .expr4 <- sign(respl) * .expr2^(1/f)
#>             .value <- b * .expr4 + e
#>             .grad <- array(0, c(length(.value), 5L), list(NULL, c("b", "c", "d", "e", "f")))
#>             .grad[, "b"] <- .expr4
#>             .grad[, "c"] <- 0
#>             .grad[, "d"] <- 0
#>             .grad[, "e"] <- 1
#>             .grad[, "f"] <- -(b * (.expr4 * (log(.expr2) * (1/f^2))))
#>             attr(.value, "gradient") <- .grad
#>             .value
#>         }
#>         EDp <- EDfct(parmVec[1], parmVec[2], parmVec[3], parmVec[4], parmVec[5])
#>         EDder <- attr(EDfct(parmVec[1], parmVec[2], parmVec[3], parmVec[4], parmVec[5]), "gradient")
#>         return(list(EDp, EDder[notFixed]))
#>     }
#> <bytecode: 0x55bef493be70>
#> <environment: 0x55bef9849428>
#> 
#> $name
#> [1] "family"
#> 
#> $text
#> [1] "Gaussian"
#> 
#> $noParm
#> [1] 5
#> 
#> $lowerAs
#> function(parm)
#>     {
#>         parmVec[indexVec] <- parm
#>         parmVec[parmNo]
#>     }
#> <bytecode: 0x55bef4dd4870>
#> <environment: 0x55befa086d18>
#> 
#> $upperAs
#> function(parm)
#>     {
#>         parmVec[indexVec] <- parm
#>         parmVec[parmNo]
#>     }
#> <bytecode: 0x55bef4dd4870>
#> <environment: 0x55befa087098>
#> 
#> $monoton
#> [1] NA
#> 
#> $fixed
#> [1] NA NA NA NA NA
#> 
#> attr(,"class")
#> [1] "gaussian"
#> Error in glm(formula = Income ~ Frost + Murder, family = gaussian, data = ds): 'family' not recognized