+ Reply to Thread
Results 1 to 2 of 2

Thread: Determining Classification accuracy of a Multinomial Logistic Regression using R nnet

  1. #1
    Points: 7, Level: 1
    Level completed: 13%, Points required for next Level: 43

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determining Classification accuracy of a Multinomial Logistic Regression using R nnet




    Hi,

    I am trying to assess the classification accuracy for a Multinomial Logistic Regression model using R. I have adapted the example below to my project:
    http://www.ats.ucla.edu/stat/r/dae/mlogit.htm

    My data structure and model are: Customer ID, Segment (A, B, C) as my categorical DV, and 2 continuous IVs

    I am missing a way to have a final table with my customer ID, Segment and the predicted Segment so that I can determine how many cases and which customers are miss-classify in this training data set.

    Here is the last portion of my code:

    ml$Segment2 <- relevel(ml$Segment, ref = "C")
    test <- multinom(Segment2 ~ FY16toFY14_Var + CM_3Y, data = ml)
    pp <- fitted(test)
    pp

    The table pp, only has 3 columns, 1 for each of the 3 segments values with their respective probabilities. Is there a way to append (merge) or to keep Customer ID and Segment to the table pp?

    Any guidance to tackle this problem will be greatly appreciate it.

    Thanks,

  2. #2
    TS Contributor
    Points: 18,889, Level: 87
    Level completed: 8%, Points required for next Level: 461
    CowboyBear's Avatar
    Location
    New Zealand
    Posts
    2,062
    Thanks
    121
    Thanked 427 Times in 328 Posts

    Re: Determining Classification accuracy of a Multinomial Logistic Regression using R


    Your post was caught by our spam filter for some reason. I've approved and released it now.
    Matt aka CB | twitter.com/matthewmatix

+ Reply to Thread

           




Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats