Dear All,
I received a reply from Nick Ellis, Thanks very much.
It looks like a bug and Nick has already sent CC to
bugs@insightful.com.
Mika
***********************************************************
my original question is
> I'm using S-PLUS 6.0 on WindowsXp.
> I met a problem on lm.fit.chol.
>
> Since this function has "singular.ok" argument,
> I've tried;
>
> > data <- data.frame(x=1:10, y=11:20, z=101:110)
> > mat <- model. matrix(z ~ x+ y, data=data)
> > lm.fit.chol(y=data$z, x=mat, singular.ok=T)
> Problem in dimnames(.A1) <- .A0: Cannot have dimnames for nonarray
> Use traceback() to see the call stack
>
> So, I edit some fraction of lm.fit.chol, but I have not
> received correct result yet.
>
> Does anybody have an experience to modify this function?
***************************************************
and Nick's reply is.
***************************************************
> That looks like a bug. You can also get the same behaviour calling lm with
> method="chol". If you call lm.fit.qr explicitly there is no error.
>
> > data <- data.frame(x=1:10, y=11:20, z=101:110)
> > mat <- model.matrix(z ~ x+ y, data=data)
> > lm.fit.chol(mat,data$z,sing=T)
> Problem in dimnames(.A1) <- .A0: Cannot have dimnames for nonarray
> Use traceback() to see the call stack
> > lm.fit.qr(mat,data$z,sing=T)
>
> Coefficients: (1 not defined because of singularities)
> (Intercept) x
> 100 1
>
> Degrees of freedom: 10 total; 8 residual
> Residual standard error: 2.008462e-014
> > lm.fit.svd(mat,data$z)
>
> Coefficients:
> (Intercept) x y
> 161.2386 7.123864 -6.123864
>
> Degrees of freedom: 10 total; 7 residual
> Residual standard error: 3.397044e-014
> > lm(z ~ x+ y, data=data,method="chol",singular.ok=T)
> Problem in dimnames(.A1) <- .A0: Cannot have dimnames for nonarray
> Use traceback() to see the call stack
> > lm(z ~ x+ y, data=data,method="qr",singular.ok=T)
> Call:
> lm(formula = z ~ x + y, data = data, method = "qr", singular.ok = T)
>
> Coefficients: (1 not defined because of singularities)
> (Intercept) x
> 100 1
>
> Degrees of freedom: 10 total; 8 residual
> Residual standard error: 2.008462e-014
********************************************************
|