R-language Multivariate linear regression

Source: Internet
Author: User

The key to multivariate linear regression is the self-variable filter. Back method is generally used.


# Full variable regression of industrial power consumption
lm.fullind <-lm (data[,10] ~ data[,3]+data[,5]+data[,6]+data[,7]+
                   data[,14]+data[,15])
Summary (Lm.fullind)

Summary can print the P-value of each argument ("Pr (>|t|)") in the R language )

call:lm (formula = data[, ten] ~ data[, 3] + data[, 5] + data[, 6] + data[, 7] + data[, + + data[ , []]) residuals:min 1Q Median 3Q max-63.18-19.56 5.48 17.19 53.79 coefficients:es    
Timate Std. Error t value  Pr (>|t|)      (Intercept) 1832.67765 532.30742 3.443 0.001255 * data[, 3] 0.11092 0.01781 6.227 1.43e-07 * * * data[, 5]    -0.12608 0.03110-4.054 0.000197 * * * data[, 6] -0.17146 0.07263-2.361 0.022637 * data[, 7] 0.27577 0.11750 2.347 0.023389 * data[, +] 4.11264 0.96517 4.261 0.000103 * * data[, 15]-15.69347 4.80593- 3.265 0.002094 * *---signif. codes:0 ' * * * ' 0.001 ' * * ' 0.01 ' * ' 0.05 '. '  0.1 ' 1 residual standard error:28.97 on degrees of freedom (from observations deleted due to missingness) multiple r-squared:0.6968, Adjusted r-squared:0.6564 f-statistic:17.24 on 6 and DF, p-value:3.155e-10 
Each time the maximum value of the argument is rejected until all arguments are followed by an * number.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.