Can you generate an index based on factor score? (like 'alpha' does in STATA?)

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'.

https://data.library.virginia.edu/using-and-interpreting-cronbachs-alpha/

library(psy)
The variables Q1, Q2, Q3, Q4, Q5, and Q6 should be defined as a matrix or data frame called X (or any name you decide to give it); then issue the following command:

cronbach(X)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.