I'm using the Perl module of Statistics::Regression
. It runs multi-variate regressions fine. However, if I only supply one regressor in the constructor
my $reg = Statistics::Regression->new("Sample Regression", ['X']);
It complains with this message:
Statistics::Regression:new: Cannot run a regression without at least two variables.
Do people have the same problem? The error message is not clearly worded so that I interpreted as if I'm not supplying the response variable. But that turns out not to be the case as based on its doc and some sample scripts I tested on the side, the list reference in the constructor should only include regressors.
IN any case, how do you run a single variable regression (no constant term) using this module? (I know Statistics::OLS
can do that but for simplicity I would like this module to work. At any rate, feels like a stupid omission if it truly cannot handle that.) Thx!