Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6325741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:57:12+00:00 2026-05-24T16:57:12+00:00

I learned to get a linear fit with some points using lm in my

  • 0

I learned to get a linear fit with some points using lm in my R script. So, I did that (which worked nice), and printed out the fit:

lm(formula = y2 ~ x2)

Residuals:
         1          2          3          4 
 5.000e+00 -1.000e+01  5.000e+00  7.327e-15 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)   
(Intercept)   70.000     17.958   3.898  0.05996 . 
x2            85.000      3.873  21.947  0.00207 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 8.66 on 2 degrees of freedom
Multiple R-squared: 0.9959, Adjusted R-squared: 0.9938 
F-statistic: 481.7 on 1 and 2 DF,  p-value: 0.00207 

I’m trying to determine the best way to judge how great this fit is. I need to compare this fit with a few others (which are also linear using lm() function). What value from this summary would be the best way to judge how good this fit is? I was thinking to use the residual standard error. Any suggestions. Also, how do I extract that value from the fit variable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:57:13+00:00Added an answer on May 24, 2026 at 4:57 pm

    If you want to access the pieces produced by summary directly, you can just call summary and store the result in a variable and then inspect the resulting object:

    rs <- summary(lm1)
    names(rs)
    

    Perhaps rs$sigma is what you’re looking for?

    EDIT

    Before someone chides me, I should point out that for some of this information, this is not the recommended way to access it. Rather you should use the designated extractors like residuals() or coef.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I learned some time ago about Decision Trees and Decision tables. I feel that
I use numpy for numerical linear algebra. I suspect that I can get much
I recently learned that I can get hg log to print the history in
I just learned about list comprehension, which is a great fast way to get
As I learned recently there are some types of expressions in Mathematica which are
I've learned that the best way to get graceful rotation is to set the
So I have learned that when a file is uploaded in Drupal, you get
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
I learned that by trying to use the tablesorter plug in from jquery the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.