s-news
[Top] [All Lists]

Summary: lm.fit.chol

To: <s-news@lists.biostat.wustl.edu>
Subject: Summary: lm.fit.chol
From: "Mika Nakazono" <mika@msi.co.jp>
Date: Mon, 24 Mar 2003 11:37:09 +0900
Cc: <Nick.Ellis@csiro.au>
Importance: Normal
In-reply-to: <745A64FABDC57D4E83A71D1B613687B2968A49@apogon.bne.marine.csiro.au>
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
********************************************************


<Prev in Thread] Current Thread [Next in Thread>
  • Summary: lm.fit.chol, Mika Nakazono <=