Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Getting flagged values in residual plot in R

  1. May 9, 2017 #1
    ResidualsVsFitted.png












    What does the 8 and the 50 mean? I know that they are flagged values. Often, this happens. The plot is off because of some extreme points, the plot flags them, and I go into the dataset and cannot find them. Are they the built in row numbers of the dataframe? or are they something else?
     
  2. jcsd
  3. May 10, 2017 #2

    andrewkirk

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    This is a very program-specific question, which is not really in the main subject area of physicsforums. If you have no luck here the best place to ask is stack overflow, tagging your question as about R, graphics and regression. Stack overflow is designed for programming-specific questions, and I have always been able to find answers there.

    That said, I have one suggestion. Since the plot points flagged with 8 and 50 have respectively the lowest and highest residuals, you could identify the numbers of the rows in the data to which they relate by which.min(mod$residuals) and which.max(mod$residuals) where mod is the name you have given to the model variable holding the results of the regression.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Getting flagged values in residual plot in R
  1. Plotting in gnuplot (Replies: 2)

  2. Can Excel plot graph? (Replies: 9)

Loading...