简体   繁体   中英

How to compare coefficients of two logistic regression models using R?

I am trying to model the effect of an event on the odds ratio using logistic regression. So I have 4 months before and 4 months after the event. The data is pooled cross sectional, so I have one observation for each individual but across different times of collection. However, there is no controlled sample, all the sample in the latter 4 months is affected by the event. So I can NOT create a 2x2 matrix where there is controlled versus treated and before versus after the event. I only have 1x2 dimension: before and after the event. I am trying to compare the coefficients of two logistic regression model, model 1 includes data before the event and model 2 includes data after the event. I used moderation (interaction) so far but my boss thinks it is not the right way. In this, I put all the data in 1 model and I included an interaction between all the predictors and the event. However, he thinks that this model is daunting because it includes a lot of independent variables (the predictors, a dummy variable for the event, an interaction between each of the predictors and the dummy event and finally the controls). My objective: To measure the effect of the event on the influence of the predictors (which are binary, categorical and numerical variables) on the binary outcome variable. I need to find a statistic similar to the t-test: the t-test compares mean values but I need to compare the beta (the regression coefficients) in this case. Is there any statistic parallel to the t-test that compares the coefficients of 2 regression models? (I am using logistic regression using R) Thank you

I suggest running a single model using all the data, with an interaction between your current predictor(s) and an indicator for "after the event".

Then the z-statistic and p-value for the interaction in the regression output relates to the test of the hypothesis that the coefficient for the period before the event is the same as the coefficient for the period after the event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM