Displaying 1 result from an estimated 1 matches for "mean_emp".
Did you mean:
mean_temp
2009 Aug 14
1
Simulation Function - Save results
...n I would like to create 2 vectors with the mean and var results from S
simulations
#Function B
simul<-function(S){
teste<-rep(0,S)
for(i in 1:S){
teste[i]<-boot(10,12,15) #ACCORDING TO FUNCTION A I AM SAVING JUST THE
MEAN_BOOT, BUT I ALSO NEED THE RESULT OF VAR_BOOT
}
var<-var(teste)
mean_emp<-mean(var_boot) #THIS IS NOT WORKING, BECAUSE I DONT HAVE THE
VAR_BOOT AT MY VECTOR
var_emp<-(sum((var_boot-var)**2))/S #THIS IS NOT WORKING, BECAUSE I DONT
HAVE THE VAR_BOOT AT MY VECTOR
}
simul(5)
But my problem is that I don't know how to save my results in 2 vectors in
order to use t...