I am supposed to plot some results in R that the original researcher analyzed in STATA. One of her variables is an index generated from four items. This is what she does in STATA:
alpha item1 item2 item3 item4, item det gen (factor01)
I am not familiar with STATA at all.
For now, I have simply created the variable like this:
d$factor01 <- d$item1 + d$item2 + d$item3 + d$item4
d$FACTOR01 <- (d$factor01-min(d$factor01))/(max(d$factor01)-min(w10$factor01))
Which gives me same results (close enough for the graph anyway), but I would really like to know if R has an equivalent to STATA's 'alpha'.