[R] Composite index reliability questions - cronbach()
nick.petschek at gmail.com
Sat Sep 5 18:09:41 CEST 2015
The lack of quotes was a typo, but what was not was my forgetting to
include the "c(" function... Thanks!
On Sat, Sep 5, 2015 at 7:23 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Nick,
> If you haven't just made a typo on your example in QUESTION 2, the "This
> doesn't" line should read:
> Without the quotes, R looks for three objects named Q1, Q2 and Q3 and
> probably doesn't find them.
> On Sat, Sep 5, 2015 at 7:27 AM, Nick Petschek <nick.petschek at gmail.com>
>> 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
>> 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")]*
>> 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.
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help