create_rnd_exa<-function(types, blur=NULL, eps=1e-6){reps<-as.integer(types$n)len<-sum(reps)df<-data.frame( ID =rep(types$ID, times =reps), p =0, fea_m =rep(types$fea_m, times =reps), fea_sd =rep(types$fea_sd, times =reps), cog_m =rep(types$cog_m, times =reps), cog_sd =rep(types$cog_sd, times =reps), fea =0, cog =0)df$fea<-rbeta_msd(n =len, m =df$fea_m, sd =df$fea_sd, eps =eps)df$p<-pbeta_msd(q =df$fea, m =df$fea_m, sd =df$fea_sd, eps =eps)df$cog<-qbeta_msd(p =df$p, m =df$cog_m, sd =df$cog_sd, eps =eps)if(!is.null(blur)&&length(blur)==1){df$fea<-df$fea+runif(len, min =-blur, max =blur)df$cog<-df$cog+runif(len, min =-blur, max =blur)df$fea<-pmin(pmax(df$fea, 0), 1)df$cog<-pmin(pmax(df$cog, 0), 1)}df[, c("ID", "fea", "cog")]}exampels<-create_rnd_exa(types, blur =0.02)head(exampels)
plot_exampels_lm(exampels, c("150_L_H_M", "150_M_H_M", "150_H_H_M","150_L_M_M", "150_M_M_M", "150_H_M_M","150_L_L_M", "150_M_L_M", "150_H_L_M"), title ="Differences in Cognitive Interpretation\nAcross Levels of Feature Expression and Cognitive Reaction", save ="dif_cog_int_fea_exp_cog_rea")
Saving 8 x 9.5 in image
plot_exampels_lm(exampels, c("150_M_M_L", "150_M_M_M", "150_M_M_H"), title ="Differences in Cognitive Interpretation\nAcross Levels of Interpretative Sensitivity (Slopes)", save ="dif_cog_int_sen")
Saving 8 x 4 in image
plot_exampels_lm(exampels, c("050_M_M_M", "150_M_M_M", "250_M_M_M"), title ="Differences in Cognitive Interpretation\nAcross Levels of Accumulated Experience", save ="dif_cog_int_nexp")