20 lines
860 B
Plaintext
20 lines
860 B
Plaintext
LinearAlgebra[LeastSquares](X,Y)^+;
|
|
# [4.33701132468683, -2.78654498997457, -1.41840666085642, 2.92065133466547, 1.76076442997642]
|
|
|
|
Statistics[LinearFit]([x1,x2,x3,x4,c],X,Y,[x1,x2,x3,x4,c],summarize=true)
|
|
# Summary:
|
|
# ----------------
|
|
# Model: 4.3370113*x1-2.7865450*x2-1.4184067*x3+2.9206513*x4+1.7607644*c
|
|
# ----------------
|
|
# Coefficients:
|
|
# Estimate Std. Error t-value P(>|t|)
|
|
# Parameter 1 4.3370 0.0691 62.7409 0.0000
|
|
# Parameter 2 -2.7865 0.0661 -42.1637 0.0000
|
|
# Parameter 3 -1.4184 0.0699 -20.2937 0.0000
|
|
# Parameter 4 2.9207 0.0687 42.5380 0.0000
|
|
# Parameter 5 1.7608 0.0701 25.1210 0.0000
|
|
# ----------------
|
|
# R-squared: 0.9767, Adjusted R-squared: 0.9761
|
|
# 4.33701132468683 x1 - 2.78654498997457 x2 - 1.41840666085642 x3
|
|
# + 2.92065133466547 x4 + 1.76076442997642 c
|