Displaying 3 results from an estimated 3 matches for "relative_risk".
2004 Jun 02
2
poisson regression with robust error variance ('eyestudy')
Dear all,
i am trying to redo the 'eyestudy' analysis presented on the site
http://www.ats.ucla.edu/stat/stata/faq/relative_risk.htm
with R (1.9.0), with special interest in the section on "relative risk
estimation by poisson regression with robust error variance".
so i guess rlm is the function to use. but what is its equivalent to the
glm's argument "family" to indicate 'poisson'? or am i...
2008 May 08
2
poisson regression with robust error variance ('eyestudy
...s of freedom
# Residual deviance: 64.536 on 98 degrees of freedom
# AIC: 174.54
# Number of Fisher Scoring iterations: 5
# > sqrt(diag(vcovHC(glm1, type="HC0")))
# (Intercept) carrot0
# 0.1673655 0.1971117
# >
### Compare against
## http://www.ats.ucla.edu/stat/stata/faq/relative_risk.htm
## robust standard errors are:
## .1682086 .1981048
glm2 <- glm(lenses~carrot0 +gender1 +latitude, data=dat,
family=poisson(link=log))
sqrt(diag(vcovHC(glm2, type="HC0")))
### Result:
# > summary(glm2)
#Call:
# glm(formula = lenses ~ carrot0 + gender1 + latitude, family...
2023 Dec 06
0
How to calculate relative risk from GAM model in mgcv package?
...a$holiday)
model <- gam(adm ~ s(PM10, k = 5) + s(PM2.5, k = 5) + s(CO, k = 5) + s(NO2,
k = 5) + s(SO2, k = 5) + s(O3, k = 5) + weekend + holiday, family =
quasipoisson(link = "log"), data = data, method = "REML")
pred <- predict.gam (model, type = "response")
relative_risk <- exp(pred$fit)
However, when I look at the results, it calculates RR for 365 days
separately.
How can I get a result like the table 4 in this article (
https://pubmed.ncbi.nlm.nih.gov/36161569/)? There is only one RR
calculation for each pollutant.
I would be very grateful if you could help...