0

Assume the following variables:

BreathingTestResult - continuous variable indicating how well a 
                      person is breathing
Gender - binary variable with gender
BMI - continuous body mass index
FluStatus - whether a person had the flu (positive by test)
LastTestDate - days since last text exam, only valid if the 
               patient had a positive flu test and indicates 
               the period from when the person had the flu

Can you do the following: lm(BreathingTestResult ~ Gender + BMI + FluStatus + FluStatus:LastTestDate, data = data)

If I understand correctly, the FluStatus:LastTestDate term should only be calculated for when FluStatus is true and shouldn't be used in the case of FluStatus = False, however somehow there are estimates calculated for both false and true. Is there a way to do this correctly?

Would appreciate any guidance on this!

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Cenoc
  • 119
  • 1
  • 10

0 Answers0