"Standard error" usually means the estimated standard deviation of a parameter 
estimate, e.g. the sample mean.

Perhaps you mean the estimated standard deviation of the data.  If so

sdev <- sd(x, na.rm = TRUE)

If you want the standard error of the mean there are several ways of doing it.  
Perhaps the simplest is

seMean <- sd(x, na.rm=TRUE)/sqrt(length(na.omit(x)))

missing values complicate the issue just a little.

Bill Venables.
________________________________________
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of 
Mcdonald, Grant [grant.mcdonal...@imperial.ac.uk]
Sent: 29 August 2009 04:50
To: r-help@R-project.org
Subject: [R] std.error

dear sir,

i am trying to calculate the standard error of my data (x),

i have tried se(x, na.rm=TRUE)
and std.error(x)

neither have worked and i cannot find an alternative


sorry to bother with such a basic problem
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to