Open andkov opened 8 years ago
@andkov, I like the graphs. I have three reactions.
Consider forcing the p-values to have ~3 digits after the decimal.
Shooting from the hip, I recommend replacing
paste0("R_ICIP: ", dsL$R_IPIC_est[1]," (",dsL$R_IPIC_se[1],"), p = ",dsL$R_IPIC_pval[1] )
with
sprintf("R_ICIP: %f (%f), p=%0.3f", dsL$R_IPIC_est[1], dsL$R_IPIC_se[1], dsL$R_IPIC_pval[1])
If you want to get fancier and remove the leading zero, see our recent table.
Please see HRS_F_grip-pef (probably not a quick Q, so you may not want to look at it until tomorrow): Scatter and line look positive, but R_SCSP is negative. Mismatch? Also – are these the SE from Mplus? I’ve started to mistrust them, as I expect that the SE of r should not exceed 1. I’ve computed them in Excel for the manuscript, but it would be good to eventually figure out what Mplus is doing.
1) I'm sad that symmetry is not apparent. I had the following in mind: Left-right diagonal.
Right-left diagonal.
I might switch the locations of c and b, to have rows on the same metric.
2) didn't attend to cosmetics at all. I want to take a look at what you did for the tables and implement here.
3) Same as 2.
[ ] Oh, don't be sad, that makes me sad too. :cry:
I see the pattern now, and I like it. I think it needs only more explicit labels, that are possibly redundant. For instance in the top left panel, it would have helped me if the x and y axis titles were "grip intercept" and "gait intercept". Keep the redundant labels in the top left corners.
[ ] Here's a graph I did a couple of years ago that might have some elements you'd like for the diagonal panels.
R_ICIP
were translated to something like r(b0[gait],b0[grip])
. And realistically, the code would look more like substitute(italic(r)(italic(b)0[ip], italic(b)0[ic]), list(ip=dsL$process1[1], cp=dsL$process2[1]))
(If you were taking this test, hope that you get graded by rater 1031 or 1034, and not 1030.)
ReliabilityPair <- function( dsPlot, xName, yName, jitterAmount=.25, mainLabel=NULL ) {
m <- lm(as.formula(paste(yName, "~", xName)), dsPlot)
eqn <- as.character(as.expression( #See Recipe 5.9 in Chang, 2013
substitute(italic(y)==a + b * italic(x) * "," ~ ~italic(r)^2 ~ "=" ~ r2,
list(a=format(coef(m)[1], digits=3),#The intercept
b=format(coef(m)[2], digits=3), #The slope
r2=format(summary(m)$r.squared, digits=3)))
))
g <- ggplot(dsPlot, aes_string(x=xName, y=yName)) +
geom_abline(color=alpha("turquoise", alpha=.2), size=2) +
annotate("text", label=eqn, x=Inf, y=Inf, hjust=1.1, vjust=1.5, parse=TRUE, size=6, color="gray60") +
annotate("text", label="italic(bar(x))", x=mean(dsPlot[, xName], na.rm=T), y=Inf, hjust=.5, vjust=1.5, parse=TRUE, size=7, color="gray60") +
annotate("text", label="italic(bar(y))", x=Inf, y=mean(dsPlot[, yName], na.rm=T), hjust=1.5, vjust=.5, parse=TRUE, size=7, color="gray60") +
geom_vline(x=mean(dsPlot[, xName], na.rm=T), color=rgb(.3, .3, .1, .2), size=3) +
geom_hline(y=mean(dsPlot[, yName], na.rm=T), color=rgb(.3, .3, .1, .2), size=3) +
geom_smooth(method="lm", color="orange", fill="orange", alpha=.2, na.rm=T) +
geom_smooth(method="loess", color="purple", fill="purple", alpha=.2, na.rm=T) +
geom_point(stat="identity", position = position_jitter(w=jitterAmount, h=jitterAmount), shape=1) +
coord_fixed(xlim=c(1-jitterAmount-.1, 5+jitterAmount+.1), ylim=c(1-jitterAmount-.1, 5+jitterAmount+.1)) +
labs(title=mainLabel) +
theme_bw()
g
}
@wibeasley ,
The latest version of the graph that plots the scatters of factor scores obtained from the .gh5 looks as follows:
The graphs could be viewed grouped by process pairs for females and males