Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies cross models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.

# S3 method for geeglm
tidy(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...)

Arguments

x

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

conf.int

Logical indicating whether or not to include a confidence interval in the tidied output. Defaults to FALSE.

conf.level

The confidence level to use for the confidence interval if conf.int = TRUE. Must be strictly greater than 0 and less than 1. Defaults to 0.95, which corresponds to a 95 percent confidence interval.

exponentiate

Logical indicating whether or not to exponentiate the the coefficient estimates. This is typical for logistic and multinomial regressions, but a bad idea if there is no log or logit link. Defaults to FALSE.

...

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.

Details

If conf.int = TRUE, the confidence interval is computed with the an internal confint.geeglm() function.

If you have missing values in your model data, you may need to refit the model with na.action = na.exclude or deal with the missingness in the data beforehand.

See also

Value

A tibble::tibble() with columns:

regresion

TRUE

Examples

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")
#> $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: 0xdfefe78> #> <environment: 0x2077ded8> #> #> $ssfct #> function (dframe) #> { #> x <- dframe[, 1] #> y <- dframe[, 2] #> cdVal <- findcd(x, y) #> if (useFixed) { #> } #> if (logg) { #> bVal <- 0.75 * sd(log(x[y > quantile(y, 0.75)])) #> } #> else { #> bVal <- 0.75 * sd(x[y > quantile(y, 0.75)]) #> } #> befVal <- c(bVal, x[which.max(y)], 1) #> return(c(befVal[1], cdVal, befVal[2:3])[is.na(fixed)]) #> } #> <bytecode: 0xd5ee340> #> <environment: 0x2077eae0> #> #> $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: 0xdff2770> #> <environment: 0x2077ded8> #> #> $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: 0xdff51f0> #> <environment: 0x2077ded8> #> #> $edfct #> function (parm, respl, reference, type, ...) #> { #> parmVec[notFixed] <- parm #> p <- absToRel(parmVec, abs(respl), type) #> if (identical(type, "absolute")) { #> p <- 100 - p #> } #> if (identical(type, "relative") && (parmVec[1] < 0) && (reference == #> "control")) { #> p <- 100 - p #> } #> pProp <- 1 - (100 - p)/100 #> EDfct <- function(b, c, d, e, f) { #> .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: 0xdffaab8> #> <environment: 0x2077ded8> #> #> $name #> [1] "family" #> #> $text #> [1] "Gaussian" #> #> $noParm #> [1] 5 #> #> $lowerAs #> function (parm) #> { #> parmVec[indexVec] <- parm #> parmVec[parmNo] #> } #> <bytecode: 0xe2ae660> #> <environment: 0x2077a220> #> #> $upperAs #> function (parm) #> { #> parmVec[indexVec] <- parm #> parmVec[parmNo] #> } #> <bytecode: 0xe2ae660> #> <environment: 0x2077a488> #> #> $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
tidy(geefit)
#> Error in tidy(geefit): object 'geefit' not found
tidy(geefit, conf.int = TRUE)
#> Error in tidy(geefit, conf.int = TRUE): object 'geefit' not found