[R] calculating std err (SEM)?
Andrew Perrin
andrew_perrin at unc.edu
Fri Mar 1 17:49:57 CET 2002
try sd(x)
ap
----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
On 1 Mar 2002, Kirk R. Wythers wrote:
> Is there a "canned" function in R for finding the standard error of the
> mean? I have tried
>
> > sem <- function(x) c(mean =mean(x),
> + SEM = stdev(x)/sqrt(length(x)))
> > sem(pnet.lai)
> Error in sem(pnet.lai) : couldn't find function "stdev"
>
>
> It looks like there is no stdev function in R
>
> Thanks,
>
> Kirk
>
>
>
> Kirk R. Wythers email: kwythers at umn.edu
> University of Minnesota tel: 612.625.2261
> Department of Forest Resources fax: 612.625.5212
> Saint Paul, MN 55108
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help 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-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list