[R] LARS error

Uwe Ligges
Thu, 25 May 2006 14:55:35 -0000

Cal Stats wrote:

> Hi All,
>
>   when i run
>
>      cv.lars(x3,y3)
>
>   it runs fine. but when i run
>
>   cv.lars(x3,y3,fraction=seq(0,0.1,100))
>
>   I get the following error.
>
>   Error in apply((y[omit] - fit)^2, 2, mean) : dim(X) must have a positive
length
>
>   Any help/suggestions will be appreciated.


Probably y[omit] is of length 0 here...
Anyway, hard to see the real reason without a reproducible example.
Note that seq(0,0.1,100) produces 0, while you probably want
seq(0, 0.1, length=100).


Uwe Ligges



>   Thanks.
>
>   Harsh
>
>
> ---------------------------------
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!