Logistic Regression with R: Categorical Response Variable at Two Levels (2015)

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 89

  • @bananaleaf
    @bananaleaf 4 роки тому

    hi Dr Rai, can i calculate the 95% CI instead of SE ?
    may i know the R code for that?

  • @sudheer384
    @sudheer384 7 років тому +1

    Hai, sir i have a small doubt.Please clarrify me i.e What you done execution Part(commands) is applicable to ramaining datasets(example Product salesi.e Buy or not Buying) to build a model in Logistic Regression model???

    • @bkrai
      @bkrai  7 років тому

      You should make use of all variables that are statistically significant.

  • @ghostshiphost5744
    @ghostshiphost5744 8 років тому

    Hi Bharatendra,
    Thanks for making this video.
    I have a small request. Please share the dataset, binary.csv for us to follow your good example.
    Best Regards

    • @bkrai
      @bkrai  8 років тому

      +GhostShip Host send me your email id, I'll send it to you.

    • @actan999
      @actan999 8 років тому

      Thanks for responding. My email is ghostshiphost@gmail.com

  • @sillytechy
    @sillytechy 7 років тому +1

    sir,my friend actually told me about your R lecture videos on R ,It is easy to understand and commendable,i hope you dont mind for asking can you post a video
    on the topic"Difference between linear regression ,logistic regression and discriminant analysis ,when and where to use them".
    i am right now diving into the world of data science and wanted to know the math behind it in simple terms. thank you.

    • @bkrai
      @bkrai  7 років тому

      linear regression is done when 'y' variable is quantitative. Logistic regression and discriminant analysis are done when 'y' is categorical. Later two can be used for developing classification and prediction models. For more on discriminant analysis, see: ua-cam.com/video/WUCnHx0QDSI/v-deo.html

  • @vishnukowndinya
    @vishnukowndinya 7 років тому

    Hi Sir, i have few doubts. could u pls clarify them once.
    When u 1st run the model, in o/p it's not showing "rank 1" ?
    in model_pred_admit rep("0", 75), what does 0 represent here?
    Thank u :)

    • @bkrai
      @bkrai  7 років тому +1

      That's correct, because when a categorical independent variable has 4 levels, we need only 3 dummy variables which in this case are rank2, rank3, and rank4.
      The line rep('0', 75) basically repeats '0' 75 times. Probably I re-record this video to make the steps simpler.

  • @poornimavishwaradhya6958
    @poornimavishwaradhya6958 8 років тому

    Hi, Thanks for sharing this video. Would like to know how to perform an Ordinal Logistic Regression and how to predict the probability value for ordinal variable row wise i.e., for each case.

    • @bkrai
      @bkrai  8 років тому

      Thanks for the feedback! Here is the link to ordinal logistic regression::
      ua-cam.com/video/qkivJzjyHoA/v-deo.html

  • @bharathjc4700
    @bharathjc4700 7 років тому

    Hi sir,how do we find the misclassified values in bring andbring them as output

    • @bkrai
      @bkrai  7 років тому

      I've created a more recent version of this. You can get it from this link:
      ua-cam.com/video/AVx7Wc1CQ7Y/v-deo.html

  • @mariamamagour7248
    @mariamamagour7248 7 років тому

    thank you for the explanation I would like to know how can I apply the prediction model I got on a new set of data for which the dependent variable is unknown (either a 0 or 1) thanks in advance

    • @bkrai
      @bkrai  7 років тому +1

      suppose your model is stored in "mylogit" and your new dataset is named "newdata", then you can use 'predict' command to apply existing model to new data. Given below is an example:
      predict(mylogit, newdata)

  • @NishaYadav-im7bt
    @NishaYadav-im7bt 6 років тому

    Hello sir, i have doubt that how we get to know that rank 1 is significant or not ,and y it is not shown in the final output

    • @bkrai
      @bkrai  6 років тому

      We do not conclude whether each level of rank is significant or not. Even if one of the levels turns out to be statistically significant, then we can treat rank as a significant variable. In the equation, rank1 is represented by other 3 levels of rank being zero.

  • @Rovearound
    @Rovearound 7 років тому

    hello sir,
    if i have excel file of some pesticide data , then how will I convert it into csv file.

    • @bkrai
      @bkrai  7 років тому

      You can save it as a csv file. Excel allows you to do that.

  • @vishnukowndinya
    @vishnukowndinya 7 років тому

    Null dev: the response variable is predicted 'only using intercept (beta)' . it means model with only intercept
    residual dev: model with all significant variables.
    But i want to know how they are estimated or calculated ? how to interpret those particular things, to decide the best fit model ?
    hi, can u pls have a look and clarify this one too.
    Could u pls share the dataset vishnu kowndinya
    Thanks for the videos :)

    • @bkrai
      @bkrai  7 років тому

      For calculations and more details you can look at following:
      ua-cam.com/video/fDjKa7yWk1U/v-deo.html
      Here the response variable is at three levels. Steps involved with work with two level situations too. For data, send email id.

    • @vishnukowndinya
      @vishnukowndinya 7 років тому +1

      Bharatendra Rai thank u for the quick response sir. :) my email kowndinya.p@gmail.com

    • @bkrai
      @bkrai  7 років тому

      all set.

    • @shantanutamuly6932
      @shantanutamuly6932 4 роки тому

      Excellent video. Could you please share the codes.
      stam@vetbifg.ac.in

  • @sapnapatil27
    @sapnapatil27 7 років тому

    Also how do we decide > 0.5 is 1 in misclassification error

    • @bkrai
      @bkrai  7 років тому

      0.5 is default but if any other value for the cut-off reduces errors then its a good idea to explore it.

  • @mariamamagour7248
    @mariamamagour7248 7 років тому

    and how can i draw the roc curve?

    • @mariamamagour7248
      @mariamamagour7248 7 років тому

      if you could give me please the code of the roc of your example thanks a lot for you clarification ^^

    • @bkrai
      @bkrai  7 років тому

      you can now find roc curve video here:
      ua-cam.com/video/ypO1DPEKYFo/v-deo.html

  • @sapnapatil27
    @sapnapatil27 7 років тому

    why we convert rank variable to factor? what if we leave it as integer?

    • @bkrai
      @bkrai  7 років тому

      In regression analysis, we create dummy variables from qualitative variables. If you leave it as integer, dummy variables will not be created. Probably you can review chapter on regression from any book to go into more details.

    • @vigneshpadmanabhan
      @vigneshpadmanabhan 7 років тому

      could you do one video like this for Ann ( artificial neural network). I have watched all your videos. they are very interesting.

  • @vishnukowndinya
    @vishnukowndinya 7 років тому

    Hi sir, can u pls explain this part of code :
    ind

    • @bkrai
      @bkrai  7 років тому +1

      Data partitioning is explained in detail here: ua-cam.com/video/aS1O8EiGLdg/v-deo.html