Displaying 1 result from an estimated 1 matches for "mean_var".
2009 Aug 18
1
Simulation function
...getting
it right...
An example of what I am looking for sounds like this...
boot<-function(a,b,c){
media<-(a+b+c)/3
var_app<-var(a)
list(media=media,var_app=var_app)
}
boot(2,4,10)
simul<-function(S){
results<-rep(0,S)
for(i in 1:S){
results[i]<-boot(2,4,10)
}
var<-var(media)
mean_var<-mean(var_app)
var_var<-var(var_app)
list(var=var,mean_var=mean_var,var_var=var_var)
}
simul(5)
--
View this message in context: http://www.nabble.com/Simulation-function-tp25027993p25027993.html
Sent from the R help mailing list archive at Nabble.com.