Standard error in a multilevel / hierarchical sample Suppose I have a random sample of 5 hospitals where I take one measurement of some variable from each hospital. I can then calculate the standard error of mean as $\frac{s}{\sqrt{5}}$.
However, if my sample is hierarchical, e.g. if the value for each hospital is represented not by one measurement, but by a mean of 10 several measurements (say, from 10 patients), common sense suggests within-hospital mean based on 10 measurements is more precise than 1 measurement. Therefore, among-hospital mean should also be more precise and should be associated with a lower margin of error. But how to take it into account?

Are you using a hierarchical or mixed effect model? In this case it's quite easy to represent that with something like this: lme(v1 ~ v2 + (1|Hospital), data). I am not an expert but i guess you could have a model with ONLY a random effect like this lme(v1 ~ (1|Hospital), data)
