newSampleData

Assumes that rows are concatenated with y values first in each row. For example, an input
data array containing the sequence of values (1, 2, 3, 4, 5, 6, 7, 8, 9) with
nobs = 3 and nvars = 2 creates a regression dataset with two
independent variables, as below:

y x[0] x[1]
--------------
1 2 3
4 5 6
7 8 9

Note that there is no need to add an initial unitary column (column of 1's) when
specifying a model including an intercept term. If isNoIntercept() is true,
the X matrix will be created without an initial column of "1"s; otherwise this column will
be added.

Throws IllegalArgumentException if any of the following preconditions fail: