# hierachical modeling of body temperature data to design thresholds for CoVID-19 testing

I am working through designing an approach to identifying temperature thresholds for CoVID-19 testing. I thought I would post my problem and see if any had recommendations.

Basically, I have a large dataset of people with temperature readings and covid testing results. Each person has 2-3 recordings per day, most at least 1-2 months of data. I can follow temps before and after a covid-19 test for symptoms, though after people are mostly censored. People are tested at different times of day, different body sites, different equipment.

Goal: Use the available data to determine an optimal person-specific temperature threshold that should be used to test for covid-19.

I would like to use the data to build a model which will be applied to a new temperature observation where the prior data which includes other persons, and zero or more measurements available from that particular person, and decide if any new observed temperature is abberrant enough to warrant screening.

I am thinking that a Bayesian approach with a linear mixed model is the way to go. Temperatures follow a cyclical daily trend. This regression seems to work well with the data, where $$h$$ is hour from $$0-24.$$ $$\operatorname{Temp}_{h} = \sin(2\pi h/24) + \cos(2\pi h/24).$$

I was thinking I could add a random error term for person and fit that model in STAN. Iteratively test different x% intervals for sensitivity/specificity for the testing result actually observed. I could find an upper prediction interval which is a good performing threshold, i.e. better than just using $$100.4^{\circ}\operatorname{F}$$ for fever.

This empirical model needs to take the fitted model estimates (i.e. best guess for a normal temperature curve in the absence of any person-specific information), and incorporate any known information (i.e. temperature readings) for a new person to decide if any newly observed temperature is high enough to test for CoVID-19.

This last step I am uncertain how to operationalize. Does this seem like a bad approach?

• Your function for temperature seems extremely restrictive - essentially a single sinusoid. Have you plotted your data? Does it look like a pure sinusoid? – Adrian Keister Jun 26 '20 at 20:26
• Also, temperature, as far as I know, is very non-specific symptom, so the model would probably end up as a some kind of anomaly detector. To make it more covid specific, you would probably need also readings of temperature of people with other common conditions like influenza, common cold, etc., but this is not my area of expertise, so it's pure speculation. – Tim Jun 26 '20 at 20:29