[R] How to use Subpopulation data?
dwinsemius at comcast.net
Fri Oct 2 16:38:29 CEST 2009
On Oct 1, 2009, at 6:06 AM, KABELI MEFANE wrote:
> Dear Helpers
> I have a sample frame and i have sampled from it using three methods
> and now i want to calculate the statistics but i only get the
> population parameters.
> H <- matrix(rnorm(100, mean=50000, sd=5000))
> str=strata(sampleframe,c("type"),size=c(20,), method="srswor")
If you want the number of rows in sample.strat then length(H) is the
wrong approach since that is the original (unsampled) object.
> i get:
>  100
> Desire to get:
>  20
I cannot tell what packages you have loaded and strata is not in the
sampling package which I guessed (wrongly) was where you were getting
"getdata". When you post code you should precede that code with calls
that load any non-base packages.
In later posting you ask for ways to calculate "the sum" but you do
not say what it is that you want the sum of.... . Our abilities to
read minds is extremely limited.
More information about the R-help