I have a data set that looks at a five-year timespan of peoples' lives and indicates if specific events have occurred (Divorce, Birth of Child, Health Shock, etc.).
# Sample data in R n <- 100 set.seed(1337) exampleFrame <- as.data.frame(cbind(1:n,replicate(7, sample(0:1,n, TRUE)))) colnames(exampleFrame) <- c('Person',paste(rep("Event",7),1:7, sep = ''))
First thing I did was simply show a correlation matrix.
And it gives an idea of what items follow each other, so next I ran a logistic regression to see how events are likely to improve odds of occurring together.
glm(Event1 ~ . - Person,family = binomial(link = 'logit'), data = exampleFrame)
And this is interesting, but I feel like I'm missing something more compelling. Am I chasing a phantom? Does anyone know a better way to demonstrate which life events occur together in this five-year span?