[R] Composite index reliability questions - cronbach()

Nick Petschek nick.petschek at gmail.com
Fri Sep 4 23:27:46 CEST 2015


Hi All,

I have two questions on using cronbach() from the psy() package.

My simplified situation is the following: I have a survey of 10 questions
(column names are "Q1", "Q2", etc.) that went out to 100+ people. I have
the responses to the questions, plus additional variables (demographics,
location, etc.) in a data frame (named "JDC"). I want to build composite
indices from these 10 questions. I plan to use two steps to create the
indices. First, grouping the questions by what makes intuitive sense given
what they ask, and second, by testing the reliability of these groupings
using cronbach().

QUESTION 1

Let's say I think Q1, Q3, and Q5 will make a good index. With my limited
knowledge of R, I would think there's a way to say "run the reliability on
these three variables in this dataframe". However, I have so far only been
able to test the reliability of *adjacent *variables. For example, I could
do:

*cronbach(jdc[,1:3])*

to test Q1, Q2, and Q3. Is there a way to test non-adjacent variables?

I realize I could do something like:

*trust <- jdc[, c("Q2", "Q7", "Q8")]*
*cronbach(trust)*

but that adds a few extra steps, and I have tons of questions and indices
which would make that very cumbersome, especially since I will go through
several iterations in testing potential indices.


QUESTION 2

Is there a way to refer to the column name when using cronbach(), instead
of just the location of the variable? For example:

This works:   *cronbach(jdc[,1:3])*
This doesn't:* cronbach(jdc[Q1, Q2, Q3])*


Thanks in advance for any insights, answers, words of encouragement, or
alternate ways I could solve this puzzle.

Nick

	[[alternative HTML version deleted]]



More information about the R-help mailing list