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
On Aug 28, 2009, at 2:50 PM, Mcdonald, Grant wrote:> dear sir, > > i am trying to calculate the standard error of my data (x),The term standard error is generally applied to a parameter estimate such as a regression coefficient. You may be looking for the function to retrun the standard deviation. If so then try: ?sd> > i have tried se(x, na.rm=TRUE) > and std.error(x) > > neither have worked and i cannot find an alternative > >If my guess regarding your source of confusion is wrong then you will need to reply with many more details regarding x. -- David Winsemius, MD Heritage Laboratories West Hartford, CT
Mcdonald, Grant wrote:> 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 > > >Hi Grant, There is a convenience function "std.error" that calculates the conventional standard error of the mean in the plotrix package. Make sure that it does the calculation that you want. Jim
"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-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Mcdonald, Grant [grant.mcdonald08 at imperial.ac.uk] Sent: 29 August 2009 04:50 To: r-help at 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 at 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.