zhou1_20 发表于 2019-6-27 09:50 
plot前面加一个op=par(mfrow=c(2,2))
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
op=par(mfrow=c(2,2))
plot(mu_star, mu)
title(main=output_names
)
text(mu_star, mu, labels=paraNames, cex= 0.8, pos=3)
# mu_star against sigma
op=par(mfrow=c(2,2))
plot(mu_star, sigma)
title(main=output_names)
text(mu_star, sigma, labels=paraNames, cex= 0.8, pos=3)
# mu against sigma
op=par(mfrow=c(2,2))
plot(mu, sigma)
title(main=output_names)
text(mu, sigma, labels=paraNames, cex= 0.8, pos=3)
是这样吗,怎么显示不出来图形结果呀