Getting flagged values in residual plot in R

  • Thread starter Thread starter FallenApple
  • Start date Start date
  • Tags Tags
    Plot
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 1K views
FallenApple
Messages
564
Reaction score
61
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?
 
Physics news on Phys.org
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.
 
  • Like
Likes   Reactions: FallenApple