# Monte-Carlo approach # The functions from Part_V_common_functions.r must be loaded beforehand: # drag-and-drop the file onto the R-console or run source("Part_V_common_functions.r") # Moreover, you need to run the complete code to the Chapter 25, stored in \Complete_code\chap_25.r! fwd.maj.mc<-function(c0.lab,cL.lab,min.set,ff,m,norm=F){ names(m)<-min.set rr<-fwd.mod(c0.lab=c0.lab,m=m,ff=ff,norm=T,eqn="FC")$cL[mjrs]-WR[cL.lab,mjrs] return(sum(rr^2)) } montecarlo<-function(nb.mod,min.set,guess,fuzzy,c0.lab,cL.lab,thres,keep.all=F){ n.ex<-0 res<-NULL ll<-length(min.set)+1 nm<-c(min.set,"F") while(n.ex