[R] Primer for working with survey data in R

David Winsemius dwinsemius at comcast.net
Sun Nov 12 04:56:59 CET 2017


> On Nov 11, 2017, at 2:36 PM, Fox, John <jfox at mcmaster.ca> wrote:
> 
> Dear Kevin,
> 
> In addition to the advice you've received, take a look at the survey package. It's not quite what you're asking for, but in fact it's probably more useful, in that it provides correct statistical inference for data collected in complex surveys. The package is described in an article,  T. Lumley (2004), Analysis of complex survey samples, Journal of Statistical Software 9(1): 1-19, and a book, T. Lumley, Complex Surveys: A Guide to Analysis Using R, Wiley, 2010, both by the package author.

Although the same thought occurred to me after reading the initial question, I decided against suggesting the survey package. I consulted the recommended book above and it has none of the requested statistics. It is designed for surveys that use complex sampling designs requiring weighting the observations. I also consulted the Social Sciences Task View and it seemed unhelpful for the specific requests. It seemed likely to me that even a graduate course in behavioral statistics would be focussed on the sorts of questions that the psych package delivers. The  website maintained by Revelle has several tutorials that include developed examples using R to deliver the requested measure. Obviously "reversing values" is something that would require learning basic R manipulation of factor variables.

-- 
David.

> 
> I hope that this helps,
> John
> 
>> -----Original Message-----
>> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Kevin Taylor
>> Sent: Saturday, November 11, 2017 2:57 PM
>> To: r-help at r-project.org
>> Subject: [R] Primer for working with survey data in R
>> 
>> I am taking a behavioral stats graduate class and the instructor is using SPSS.
>> I'm trying to follow along in R.
>> 
>> Recently in class we started working with scales and survey data, computing
>> Cronbach's Alpha, reversing values for reverse coded items, etc.
>> 
>> Also, SPSS has some built in functionality for entering the meta-data for your
>> survey, e.g. the possible values for items, the text of the question, etc.
>> 
>> I haven't been able to find any survey guidance for R other than how to run the
>> actual calculations (Cronbach's, reversing values).
>> 
>> Are there tutorials, books, or other primers, that would guide a newbie step by
>> step through using R for working with survey data? It would be helpful to see
>> how others are doing these things. (Not just how to run the mathematical
>> operations but how to work with and manage the data.) Possibly this would be
>> in conjunction with some packages such as Likert or Scales.
>> 
>> TIA.
>> 
>> --Kevin
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-
>> guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law



More information about the R-help mailing list