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.