I have a simple data set of a number of variables and a single binary dependent variable. The data is stored in a data frame. When I use python's statsmodels.api and logit.fit() on the dataframe I am presented with a table detailing p values and confidence intervals etc for each of the variables. I need to calculate both univariate and multivariate p values and confidence intervals for each variable, however I am unsure what logit.fit is calculating - multivariate? If so how do I calculate univariate values - maybe just analyse a single variable at a time? Sample output below:

Dep. Variable:           Vehicle        No. Observations:                11540
Model:                          Logit   Df Residuals:                    11515
Method:                           MLE   Df Model:                           24
Date:                Thu, 29 Aug 2019   Pseudo R-squ.:                 0.05443
Time:                        11:57:39   Log-Likelihood:                -7463.8
converged:                       True   LL-Null:                       -7893.4
                                        LLR p-value:                6.082e-166
                            coef    std err          z      P>|z|      [0.025      0.975]
Red                    0.0084      0.001      6.880      0.000       0.006       0.011
Green                  0.1345      0.041      3.293      0.001       0.054       0.215

I case somebody is searching for the same thing. The answer is fairly obvious. The results as presented are a multivariate analysis. To achieve a univariate analysis process a single variable at a time.


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.