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@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]]


