Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

estequa.glm

Estimating Equations in Generalized Linear Models


Description

Extracts estimating equations evaluated at the parameter estimates and the observed data for a generalized linear model fitted to the data.

Usage

## S3 method for class 'glm'
estequa(model, ...)

Arguments

model

an object of the class glm which is obtained from the fit of a generalized linear model.

...

further arguments passed to or from other methods.

Value

A vector with the value of the estimating equations evaluated at the parameter estimates and the observed data.

Examples

## Example 1
Auto <- ISLR::Auto
mod <- mpg ~ cylinders + displacement + acceleration + origin + horsepower*weight
fit1 <- glm(mod, family=inverse.gaussian("log"), data=Auto)
estequa(fit1)

## Example 2
burn1000 <- aplore3::burn1000
burn1000 <- within(burn1000, death <- factor(death, levels=c("Dead","Alive")))
mod2 <- death ~ age + gender + race + tbsa + inh_inj + flame + age*inh_inj + tbsa*inh_inj
fit2 <- glm(mod2, family=binomial("logit"), data=burn1000)
estequa(fit2)

fit3 <- glm(cases ~ offset(log(population)) + city + age, family=poisson("log"), data=skincancer)
estequa(fit3)

glmtoolbox

Set of Tools to Data Analysis using Generalized Linear Models

v0.1.0
GPL-2 | GPL-3
Authors
Luis Hernando Vanegas [aut, cre], Luz Marina Rondón [aut], Gilberto A. Paula [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.