Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

New Post: Least Square Regression

$
0
0
Anything?
Maybe something like this:
Matrix(
var xdata = new Matrix(
 new double[,]{{1, 36, 66, 45, 32},
             {1, 37, 68, 12, 2},
             {1, 47, 64, 78, 34},
             {1, 32, 53, 56, 32},
             {1, 1, 101, 24, 90}});

var ydata = new double[] { 15, 20, 25, 55, 95 };
lm(ydata ~ xdata) 
or should I do multiple doubles and then
var ydata = new double[] { 15, 20, 25, 55, 95 };
var xdata1 = new double[] {1, 36, 66, 45, 32};
var xdata2 = new double[] {1, 37, 68, 12, 2};
var xdata3 = new double[] {1, 47, 64, 78, 34};
...
lm(ydata ~ xdata1 + xdata2 + xdata3 , ...)

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>