From p.dalgaard@biostat.ku.dk  Thu Oct 24 14:28:43 2002
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 24 Oct 2002 15:28:43 +0200
Subject: Function scale (PR#2209)
In-Reply-To: <200210241253.OAA01776@pubhealth.ku.dk>
References: <200210241253.OAA01776@pubhealth.ku.dk>
Message-ID: <x265vst184.fsf@biostat.ku.dk>

lucas@toulouse.inra.fr writes:

> I found a problem with scale function,
> while using center=FALSE and scale=TRUE:
> 
> all column are not divided by standard error,
> but divided by sqrt (1/(n-1) sum Xi^2 )
> 
> Example:
> > l<- c(1,2,3)
> > scale(l,F,T)
>           [,1]
> [1,] 0.3779645
> [2,] 0.7559289
> [3,] 1.1338934
> attr(,"scaled:scale")
> [1] 2.645751
> 
> 2.645751 = sqrt( 1/2 * (1+4+9) )

And? That's exactly what the documentation says will happen. And
exactly what Splus does, even if perhaps surprising.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Function scale (PR#2209)
Peter Dalgaard BSA