(no subject)
Although not immediately relevant to the present inquiry this might still be an opportune moment to mention again an item that is at the top of my R-wish-listr: The SparseM function slm (for sparse lm) is well suited for problems like this in which the design matrix is quite sparse, so it would be great to have a version of model.matrix that would return a matrix in one of the formats of SparseM. I've hesitated to dig into this having looked a bit at the C, but if some brave soul were looking for a nice well-defined summer amusement... One can handle this "by hand" in specific instances, but it would be great to have a more automated way to do this via the formula approach. I think it is not uncommon in large regression problems that this would signficantly expand the range of applications that could be handled by R, especially on smaller machines. Regression/anova problems need only store the non-zero elements of X and computational effort on such problems should grow roughly proportionally to the number of these non-zero elements. Roger url: www.econ.uiuc.edu Roger Koenker Dept. of Economics UCL, email rkoenker at uiuc.edu Department of Economics Drayton House, vox: 217-333-4558 University of Illinois 30 Gordon St, fax: 217-244-6678 Champaign, IL 61820 London,WC1H 0AX, UK vox: 020-7679-5838
On Tue, 3 Jun 2003, Ida Scheel wrote:
It is over 3000 levels. I have enough RAM to do it, and I have run smaller examples (smaller datasets) with the same code which works. Peter Dalgaard BSA wrote:
Ida Scheel <ida.scheel at nr.no> writes:
Hei, I am trying to fit an ANOVA-model by lm. I get the error-message Error in lm.fit(x, y, offset = offset, ...) : negative length vectors are not allowed which I don't understand. My data looks fine, but one factor has extremely many levels. Does anyone have a tip?
Not really. It sounds like it might be a bug. How many levels? Can you generate a simple example (possibly with simulated data) showing the same behaviour?
[[alternate HTML version deleted]]
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help