# Repetitive records of dependent variable for different values of an independent variable in regression

I am estimating the hospital length of stay of a patient based on different independent variables such as age, sex and severity score of the patient in each visit carried out by a nurse. Each patient might be visited several times by the nurse. Therefore, in the data set, the value of hospital length of stay of a particular patient can be repeated for different patient visits. For example, a patient stays in a hospital for 2.25 days but visited 3 times by a nurse and got different severity scores each time. In this case, how I can run the regression, in my case Poisson or negative binomial, when the dependent variable is being repeated more than once for each independent variable.

My Recommendation

Prefer survival analysis models for such applications. If regression is to be used, be careful about which independent variables are considered.

Why? there is a trap here that you have guessed: if patient stays for more days, it is likely that the number of visits by nurse will be higher. It is also not clear how these multiple observations are to be handled.

Arrow of Time and Regression Models

If you are modelling the total length of stay (say in number of days), then it is important to consider all the independent variables measured before or at the time of admission to the hospital. You would not want independent variables measured during the stay at hospital into your model. Your regression model has a single point on the time axis and you are trying to predict what happened after the time point using information before the time point.

Survival Models and Handling Time

Applications with inherent concept of time are better handled with survival models. They help in modelling time till an event (example: total stay time till discharge) more naturally. Survival models also allow handling time varying independent variables: every given day, total number of visits by nurse till date for a given patient is a changing quantity. This will be called 'time varying co-variates' in the literature.

• Thanks for the answer. 1. I have used cox proportional hazard model when I wanted to estimate the effect of hospital length of stay(HOSLOS) on patient mortality (Mort) as follow: Model_cox<- coxph(Surv(HOSLOS,Mort) ~ Age + Sex + Severity, data = ds). But now I have this model HOSLOS = Age + Sex + Severity Score + Ward Occupancy% + Reason for visit. 2. The independent variable is not measured before or at the time of hospital admission. In the second model, I am aiming to understand how Ward Occupancy% impacts the HOSLOS of patients but the records for HOSLOS for a patient is repeated. – Ali Jan 5 '18 at 6:27
• Is severity score being calculated during stay at the hospital? And when the record for a patient is repeated, is it from same consecutive hospital stay or from different hospital stays (at least one discharge between them)? It would help to add these details to the question. – hssay Jan 5 '18 at 8:32
• Yes, in every visit of patients nurses record one severity score from 1 to 5. If a patient gets higher score (more than 2), then every two hours the nurse will monitor the patient again. It is from the same hospital stays. E.g, a patient HOSLOS is 25 days. Over these days she has been visited by a nurse three times and got score of 1, 4 and 3 and either was discharged home or sent to another medical unit. – Ali Jan 5 '18 at 23:15