Getting flagged values in residual plot in R

  • Thread starter Thread starter FallenApple
  • Start date Start date
  • Tags Tags
    Plot
Click For Summary
The numbers 8 and 50 in the context of flagged values in a dataset typically represent points with the lowest and highest residuals, respectively. When a plot indicates these flags, it often signifies the presence of extreme points affecting the visualization. To identify the specific rows in the dataset associated with these flagged values, one can use the functions which.min(mod$residuals) and which.max(mod$residuals), where "mod" refers to the regression model variable. For more detailed programming-related inquiries, platforms like Stack Overflow are recommended, particularly when the questions pertain to R, graphics, and regression techniques.
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?
 
Computer science 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 FallenApple
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 11 ·
Replies
11
Views
28K