In the documentation for Statistics::Regression, the instructions to add an observation is:
$reg->include( 2.0, [ 1.0, 3.0, -1.0 ] );
Then, to just run the regression on your own data:
my @obs;
observations are like: %oneobs= %{$obs[1]};
...
foreach my $obshashptr (@obs) { $reg->include( $_[1], $_[3] ); }
I'm confused by %oneobs= %{$obs[1]}: what does this notation mean? Further, what is foreach my $obshashptr (@obs) { $reg->include( $_[1], $_[3] ); } doing? Could someone help by showing me what these two statement are doing in more than one line?
It seems that $_[1] is the observation and $_[3] contains the predictor variables. So, $_[3] is an array..
