Dear all.

I am trying to relate daily deaths in a given city with air pollution
values. The model I am using is as follows:

model <- glm(deaths ~ pollution + ns(time, 13) + ns(temp, 7) + ns(rh, 5) +
dow + holiday, family=quasipoisson, data=city)

Where -
deaths: daily number of deaths
pollution: daily measured levels of air pollution
ns(time, 13): smooth function (i.e. cubic spline) of time with 13 degrees
of freedom
ns(temp, 7): smooth function (i.e. cubic spline) of temperature with 7
degrees of freedom
ns(rh, 5): smooth function (i.e. cubic spline) of humidity with 5 degrees
of freedom
dow: day of the week
holiday: dummy variable to indicate public holidays

Having run this model, how do I obtain predicted values of deaths for any
given set of pollution values?

Thanks in advance,
Dhiman Bhadra
Assistant professor.
IIM Ahmedabad.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to