library(sensitivity)
#####------------------------- Plot Morris test results -------------------------#####
output_names <- c("opt-out","imitation","optimization","repetition") # Corresponding to c(1,2,3,4)
####---------- VII. Analysis of test results (postprocessing) ----------####
paraNames <- c("ref_income", "tol_income", "tol_activity", "lambda",
"alpha_plus", "alpha_minus","phi_plus", "phi_minus")
### plots for mu* against mu/sigma
for (i in (1:length(sim_results_morris_org[,1])))
{
# add simulation results (as vector) to morris object
tell(mo, sim_results_morris_org[i,])
mu <- apply(mo$ee, 2, mean)
mu_star <- apply(mo$ee, 2, function(x) mean(abs(x)))
sigma <- apply(mo$ee, 2, sd)
## mu_star against mu
# ask user for pressing <Enter> for entering the plot
plot(mu_star, mu)
title(main=output_names)
text(mu_star, mu, labels=paraNames, cex= 0.8, pos=3)
# mu_star against sigma
plot(mu_star, sigma)
title(main=output_names)
text(mu_star, sigma, labels=paraNames, cex= 0.8, pos=3)
# mu against sigma
plot(mu, sigma)
title(main=output_names)
text(mu, sigma, labels=paraNames, cex= 0.8, pos=3)
}


雷达卡





京公网安备 11010802022788号







