flag the entries that are significantly above or below average
sig_diff(estr, var, direction)
estr | frame to look at |
---|---|
var | variable to look at |
direction | should be 'less', 'greater', or 'two.sided' |
if (FALSE) { l <- 'less' g <- 'greater' e <- out_geo$estratopri sig <- data.frame(estratopri=e, clien1n_sig=sapply(e, function(x) sig_diff(x,'clien1n',g)), d6_sig=sapply(e, function(x) sig_diff(x,"d6",g)), ed2_sig=sapply(e, function(x) sig_diff(x,"ed2",g)), for6_sig=sapply(e, function(x) sig_diff(x,"for6",l)), it1_sig=sapply(e, function(x) sig_diff(x,"it1",g)), mil10c_sig=sapply(e, function(x) sig_diff(x,"mil10c",l)), pol1_sig=sapply(e, function(x) sig_diff(x,"pol1",l)), pole2n_sig=sapply(e, function(x) sig_diff(x,"pole2n",g)), sd3new2_sig=sapply(e, function(x) sig_diff(x,"sd3new2",g)), ur_sig=sapply(e, function(x) sig_diff(x,"ur",l)), w14a_sig=sapply(e, function(x) sig_diff(x,"w14a",l)), www1_sig=sapply(e, function(x) sig_diff(x,"www1",l)), a4_5_sig=sapply(e, function(x) sig_diff(x,"a4_5",g)), aoj22_1_sig=sapply(e, function(x) sig_diff(x,"aoj22_1",g)), for4_4_sig=sapply(e, function(x) sig_diff(x,"for4_4",g)), for1n_7_sig=sapply(e, function(x) sig_diff(x,"for1n_7",g)), for5_6_sig=sapply(e, function(x) sig_diff(x,"for5_6",g)), ocup4a_3_sig=sapply(e, function(x) sig_diff(x,"ocup4a_3",g)), q3c_5_sig=sapply(e, function(x) sig_diff(x,"q3c_5",g)), vb20_4_sig=sapply(e, function(x) sig_diff(x,"vb20_4",g)), aut_idx_sig=sapply(e, function(x) sig_diff(x,"aut_idx",g)), ca_idx_sig=sapply(e, function(x) sig_diff(x,"ca_idx",g)), tr_idx_sig=sapply(e, function(x) sig_diff(x,"tr_idx",l)), fear_idx_sig=sapply(e, function(x) sig_diff(x,"fear_idx",g))) #write.csv(sig,'sig-estratopri.csv',row.names=FALSE) }