giving a (7><3) matrix, one column per predictor and a column for the
intercept.
The multifit binding uses the size of y' to allocate storage for the coefficients (c') and the covariance matrix (covmat'). The result is that usingmat' above causes a crash:
gsl: multilinear.c:54: ERROR: number of parameters c does not
match columns of matrix X
Default GSL error handler invoked.
Here, c' will equal the number of observations (aka size ofy') and not
the number of parameters (aka columns in `X').
Fix the problem by doing something like
let n = dim y -- number of obs.
p = cols x -- number of params
and use p' to allocate storage forcovmat' and c' inmultifit' and
`multifit_w'.
A design matrix is a n \times p matrix, one column per coefficient. When specifying a design matrix, I expect the following to work:
giving a (7><3) matrix, one column per predictor and a column for the intercept.
The multifit binding uses the size of
y' to allocate storage for the coefficients (
c') and the covariance matrix (covmat'). The result is that using
mat' above causes a crash:Here,
c' will equal the number of observations (aka size of
y') and not the number of parameters (aka columns in `X').Fix the problem by doing something like
and use
p' to allocate storage for
covmat' andc' in
multifit' and `multifit_w'.