
Thanks 
 
i was not aware of str, i have a very large code since i am new to r.
I forgot to mention that the package is sampling. Actually i have this simulated code:
 
n <- c(100,400,1000,1500,2000)
x <- c(2,3,3,3,5)
y <- c(7,7,9,10,10)
s <- function(mn, mx, n) {sample(mn:mx, n, replace=TRUE)}
rating=unlist(mapply(s, x, y, n))

Hypermarket <- matrix(rnorm(100, mean=50000, sd=5000))
Supermarket <- matrix(rnorm(400, mean=34000, sd=3000))
Minimarket  <- matrix(rnorm(1000, mean=10000,sd=2000))
Cornershop  <- matrix(rnorm(1500, mean=2500, sd=500))
Spazashop   <- matrix(rnorm(2000, mean=1000, sd=250))
dat=data.frame(type=c(rep("Hypermarket",100), rep("Supermarket",400),
rep("Minimarket",1000),rep("Cornershop",1500), rep("Spazashop",2000)),
value=c(Hypermarket, Supermarket, Minimarket, Cornershop,Spazashop))
 
##sample frame
sampleframe=data.frame(type=c(rep("Hypermarket",100), rep("Supermarket",400),
rep("Minimarket",1000),rep("Cornershop",1500), rep("Spazashop",2000)),
value=c(Hypermarket, Supermarket, Minimarket, Cornershop,Spazashop),
ratings =cbind(rating))
 
## package sampling
 
stra=strata(sampleframe,c("type","value","rating"),size=c(20,80,200,300,400),
method="srswor")
sample.strat<-getdata(sampleframe,stra)

sample.strat

now i want to find different estimates from sample.strat
 
Help appreciated.





      
	[[alternative HTML version deleted]]


