2
$\begingroup$

I am currently doing a bachelor thesis about why certain students at my university tend to binge drink. I have collected a dataset with 908 instances with both categorical and numerical values. The aim of the thesis is to identify which attributes that contribute the most to the classification of binge drinking.

What are your thoughts about how I should go about analysing the data? I am currently analyzing the data with decision trees which I then cross validate and prune to make the model not overfit. I consider including:

  • Image/rules of The decision tree model before pruning with 50% training, 50 % testing.

    • Its precision, accuracy and recall.
  • Image/rules of The decision tree model after pruning with 50% training, 50 % testing.

    • Its precision, accuracy and recall.

and then increase the training and decrease the testing. Then analyze and discuss the results about which attributes that are most likely to classify a binge drinker.

What are your opinions? Anything I missed out or should include? Is it a solid plan?;)

$\endgroup$
4
  • 1
    $\begingroup$ How many predictors do you have? (BTW another common approach for classification, where the goal is interpreting contributing factors, is logistic regression; this may be more common than decision-trees in epidemiology, but not my field so I cannot say for sure) $\endgroup$
    – GeoMatt22
    Commented May 5, 2017 at 22:12
  • 1
    $\begingroup$ I have in total 29 variables hence 28 predicting variables. If I would choose to go with logistic regression, does that mean I need to test all my variables against the binary DV binge drinking to see which of the following variables that give most significance? Is there any way I can test all 28 predictors simultaneously and get the results or can I only to logisitc regression one by one? $\endgroup$ Commented May 6, 2017 at 9:58
  • $\begingroup$ I am no expert, but inference on multiple predictors can be hard. One issue is masking (see here for example). One possible approach could be LASSO, which tries to do variable selection automatically (e.g. see here). $\endgroup$
    – GeoMatt22
    Commented May 6, 2017 at 15:07
  • $\begingroup$ @GeoMatt22 logistic regression is indeed more common in epidemiology than decision trees. $\endgroup$
    – mdewey
    Commented May 6, 2017 at 15:54

3 Answers 3

2
$\begingroup$

If you are interested in predicting future binge drinking from a set of variables, then a decision tree may be the way to go.

If you are interested in which variables are associated with binge drinking, I would suggest that you should switch up to using logistic regression for the categorical dependent variables and regular old OLS regression for the continuous dependent variables.

$\endgroup$
4
  • 1
    $\begingroup$ If I would choose to go with logistic regression, does that mean I need to test all my variables against the binary DV binge drinking to see which of the following variables that give most significance? Is there any way I can test all 28 predictors simultaneously and get the results or can I only to logisitc regression one by one? In my case I only have categorical (binary) DV. So I guess I should stick with logistic regression. $\endgroup$ Commented May 6, 2017 at 9:59
  • 1
    $\begingroup$ I would further add that linear and logistic models allow you to control for certain confounding features when you inspect the association between other features and binge drinking. Confounders may be age, sex, and/or income which can be associated with stress, coping, and acceptability-- as examples of measures which would have interesting implications for counseling and care. NB: binge drinking has a precise clinical definition, "various measures" of drinking do not necessarily imply binge drinking. $\endgroup$
    – AdamO
    Commented May 6, 2017 at 15:39
  • $\begingroup$ I have made a clear distinction of what classifies as binge drinking in my survey. Aprox 20 % are classified as binge drinkers and the rest resides as non drinkers and risk drinkers. Only issue with that is the imbalance class problem. $\endgroup$ Commented May 6, 2017 at 17:27
  • $\begingroup$ One question, can logisitic regression deal with categorical variables? Right now I am getting errors while trying to run logistic regression in R. > model <- glm(Riskdrickare ~.,family=binomial(link='logit'),data=training) Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1 Some of the predictors have values such as: 1-3 times a week, 3-5 times a week. Is that something the model can't handle? Is this error due to what Mark White said? Can't logit regression deal with both continously and categorical IV? $\endgroup$ Commented May 6, 2017 at 17:27
1
$\begingroup$

Decision tree / random forest is one option, if you decide to run a logit regression as well then given the rather large number of independent variables you can try implementing a shrinkage method, like LASSO, which performs both variable selection and estimation, extremely valuable when the parameter space is large. In fact you could include all of the interactions between your 28 variables (you'll then have several hundred independent variables) such that LASSO will also be able to pick up on nonlinear relationships. R packages gamlr or glmnet have this capability and make it easy to implement. If you're interested, try to look at some tutorials online or read some papers to get acquainted (I think this stuff is a little bit more involved than what you find in the typical undergrad curriculum).

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for the comment. Right now I am focusing on the performance and feature selection with decision trees, pruned trees and logistic regression and then cross-validate the models to enhance the performance and see which attributes or "features" that correlate between the models. $\endgroup$ Commented May 8, 2017 at 13:34
0
$\begingroup$

One way to do this would be to first perform a supervised classification with Random Forest, and then extract the important features.

R has a very nice Random Forest implementation - https://cran.r-project.org/web/packages/randomForest/randomForest.pdf

A very "Cliffs Notes" version of what I would do is:

library(randomForest)

rf <- randomForest(x = xvars_df,        # your 28 predictor variables (in a data frame format)
                   y = y_dep_vector)    # your dependent y-var
                   importance = TRUE)

Then extract the importance features using:

rf$importance

The most "descriptive" predictors will have the highest percent increase mean squared error (%IncMSE), as the error will increase as they are removed during the RF tree-generation.

Like I said, this is a very "Cliffs Notes" version of the pipeline, but it should guide you in a good direction if you chose to pursue it.

(EDIT: I am an R programmer so I included R code. However, I am pretty sure there are other languages that have Random Forest implementation if you are not comfortable in R.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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