1
$\begingroup$

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: enter image description here

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)?

$\endgroup$

1 Answer 1

0
$\begingroup$

It is unclear if your data is intended to be actual data or a generated sample data to test your problem solving program.

If the units are intended to be Celsius, the temperature columns still appear to be very low, all near freezing. You state this is daily data, so I infer the min and max temp are intended to be the weather on those days, but the difference between high and low is only 3 or 4 degrees, so that seems like a very unusually low span of temperature for typical weather. Normally one would expect a range of maybe 15 degrees? Is it possible the min column should actually be negative (below freezing)?

In any case, I would start by looking if the data has been loaded correctly from this sample.

$\endgroup$
1
  • $\begingroup$ It is sample data.. Now I also noticed that Average Temperature is not equal to (MaxTemp+MinTemp)/2. But I estimate huge RR either I use Average Temp or Max or Min.. I am not sure that the parameters I take are correct.. $\endgroup$
    – Korina
    Commented May 1, 2020 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.