1
$\begingroup$

Noob here.

I have a dataset with multiple observations per person. Each observation pertains to instances where a person visits the doctor. I created an outcome variable based on the amount of time that has elapsed before the next doctor visit: 1 if the next visit is within 6 months and 0 otherwise. There are also a number of demographic variables (gender, race, etc) on the dataset.

Is there any scenario where a statistical test like ttest or chisquare can be performed with these data without flattening to person level? Could I for example test for a relationship between the outcome and say, gender, even though possible that a person could have a different outcome depending on the date of their next doctor visit?

$\endgroup$
3
  • $\begingroup$ What do you mean by "flattening"? $\endgroup$
    – Peter Flom
    Feb 3 '18 at 14:28
  • $\begingroup$ @PeterFlom restructure the dataset such that there is only one observation per person. $\endgroup$ Feb 3 '18 at 14:30
  • 1
    $\begingroup$ In other words can a stat test like ttest or chisq be used only when there is one observation per person? I ask because I’m wondering if running these tests on a dataset with multiple observations per person violates the independence of observations assumption...which I’m not sure I understand. Thank you. $\endgroup$ Feb 3 '18 at 14:40
0
$\begingroup$

After reading your comments, I see your concern and it is justified. If you have multiple observations per person then you do, indeed, have a violation of independence. There are ways to deal with this. One common method is multi-level models.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you. I’ll do some digging into multi level models. $\endgroup$ Feb 3 '18 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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