I am trying to do an excercise about temperature related mortality. I want to plot exposure-response curve, identify the temperature threshold and estimate Relative Risk of mortlaity above this threshold. I work with daily data. I use GLM model(packages:nlme,splines) and DLNM package to build a crossbasis matrix for temperature and lags:
model<-glm(daily_mortality~cb+ ns(time,df=7)+dow, family=quasipoisson, data)
time=1:length(data$date) #to control for long-term and seasonal trends
dow<-as.factor(weekdays(data$date))
cb<-crossbasis(data$Temp,lag=21,argvar=list(knots= equalknots(data$Temp, df=5)), arglag=list(knots=logknots(21,3,df=4)))
pred<- crosspred(cb, model, cen=median(data$AvgTemp), cumul=TRUE)
plot()
plot(pred, "overall", ylab="cumulative RR", xlab="Temp", ylim=c(0.5,4),col=2,lwd=2)
pred$cumRRfit
pred$allRRfit
One of my problems is that I estimate huge allRRfit and cumRRfit which I think is wrong. Can anyone guess why or suggest me a paper/book to read (I have read everything of Gasparrini)?