Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sem is an unfortunate name for "standard error of the mean" #305

Open
randyzwitch opened this issue Sep 21, 2017 · 8 comments
Open

sem is an unfortunate name for "standard error of the mean" #305

randyzwitch opened this issue Sep 21, 2017 · 8 comments

Comments

@randyzwitch
Copy link
Contributor

(continued from Slack)

I was looking to see if Julia had any work around structural equation models, of which the R package is sem. In StatsBase, sem refers to standard error of the mean, which feels not easily Google-able and possibly unnecessary to have as a function altogether.

sem within StatsBase is only used in defining the function and documentation, but I haven't evaluated whether other packages use it. Does it make sense to rename, remove, or leave alone as too trivial to worry about?

@nalimilan
Copy link
Member

Renaming it would be fine if we can find a good alternative. What names do other software use?

@randyzwitch
Copy link
Contributor Author

scipy uses sem
Base R doesn't define it (plotrix package in R uses std.error, rapport packagerp.se.mean)
MATLAB doesn't provide a function, according to this blog post

So scipy does lend support to having the name remain as sem, though I feel like semean or similar would be much less ambiguous.

@andreasnoack
Copy link
Member

I don't think we need this function. It is not as common as other statistics and it is really simple to compute so I'd be in favor of just getting rid of the definition here to free the name down stream.

@diegozea
Copy link
Contributor

diegozea commented Sep 22, 2017

I'm in favor of keeping the sem functionality, because the simplest version would be std(x)/sqrt(length(x)). So, the naive implementation is slower than the sqrt(var(x)/length(x)) of this definition. However, StatsBase exports stderr and sem. Could sem be renamed to stderr?

@andreasnoack
Copy link
Member

I'd be fine with using stderr(Vector) for the mean implicitly. It couldn't really be anything else, could it?

@nalimilan
Copy link
Member

I'd rather keep sem than using stderr for that. That's really a different operation from what stderr currently does (returning the standard errors of coefficients of a model), and the standard error of the mean is just one of the possible standard errors one can compute for a vector.

@andreasnoack
Copy link
Member

andreasnoack commented Sep 22, 2017

That's really a different operation from what stderr currently does

No. It is exactly the same thing. It returns the estimated standard errordeviation of an estimator

is just one of the possible standard errors one can compute for a vector

Really? Which? The standard error of the variance? It is as implicit as stderr(RegressionModel) where it returns the estimated variance of the coefficients. It could also have been the standard error of the error variance.

@jerlich
Copy link

jerlich commented May 20, 2024

7 years later, I found out the name of the function because of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants