SPPA 2008

August 18, 2009 at 5:45 am 1 comment

| Gabriel |

The 2008 wave for the Survey of Public Participation in the Arts is now available at CPANDA. In the WSJ, Terry Teachout noticed one basic thing in the data, which is that nobody born since the Ford administration likes jazz. I’ve been waiting for this dataset for awhile because several years ago Pete Peterson and I noticed some weird differences between 92 to 02 (particularly as relates to the omnivore hypothesis) and we need a third data point to help us figure it out. Another cool thing about the dataset is that they now ask questions about literature by genre, which as seen in the literature based on SPPA music questions, is a good way to get at cultural capital type issues.

Anyway, one of the minor annoyances about SPPA is that it uses a convention of “1=Yes 2=No” whereas any native Stata speaker knows that this is an abomination and contrary to the divine rule that in all binary variables, 0 shall equal “no” and 1 shall equal “yes.” (For one thing, this makes it easier to sum the dummies into a count). As such I’ve written this code to fix these perverse variables. Just add it to the end of the do-file that CPANDA generates for you when you download the file.

*change all the yes/no vars to Stata convention where 0 is no and 1 is yes
*all variables that are similar to yes/no but slightly different (eg, PEDWWNTO) are left alone
*to avoid confusion by plugging into scripts that assume SPSS yes/no, rename these variables with suffix "r"
global yesnovars "PEX4A PEX4B PEX5 PEQ1A PEQ2A PEQ3A PEQ4A PEQ5A PEQ6A PEQ7A PEQ8AA PEQ9A PEQ10A PEQ10B PEQ11A PEQ12A PEQ13AA1 PEQ13AA2 PEQ13AA3 PEA1A PEA1B PEA2 PEA31 PEA32 PEA33 PEA34 PEA35 PEA36 PEA37 PEA38 PEA39 PEA310 PEA311 PEA41 PEA42 PEA43 PEA44 PEA45 PEA46 PEA47 PEA48 PEA49 PEA410 PEA411 PEA412 PEA413 PEA414 PEB1A PEB2A PEB3A PEB4A PEB5A PEB6 PEB7 PEB8 PEB9 PEB10 PEB11 PEB12 PEB13 PEB14 PEC2A PEC3A PEC4A PEC5A PEC6A PEC7A PEC8A PEC9A PEC10A PEC11A PEC12A PEC13A PEC14A PEC15A PEC15B PEC16A PEC16B PEC16C PEC17A PEC18A PEC19A PEC20A PEC21A PEC25A PEC26A PEC27A PED1A PED1C PED1D PED2A PED2C PED2D PED3A PED3C PED3D PED4A PED4C PED4D PED5A PED5C PED5D PED6A PED6C PED6D PED7A PED7C PED7D HETELAVL HETELHHD HUBUS PEABSPDO PEAFEVER PEAFNOW PEDW4WK PEDWAVL PEDWLKO PEDWLKWK PEDWWK PEERNCOV PEERNLAB PEERNRT PEERNUOT PEHRAVL PEJHWKO PELAYAVL PELAYFTO PELAYLK PELKAVL PEMJOT PENLFRET PESCHENR PUBUS1 PUBUS2OT PUDIS1 PUDIS2 PUHROFF1 PUHROT1 PUIODP1 PUIODP2 PUIODP3 PUJHDP1O PULAY6M PULAYDT "
sum $yesnovars
*check that range is (1,2)

lab def yesno 0 "N" 1 "Y"

foreach var in $yesnovars {
	recode `var' 2=0 1=1 .=.
	lab val `var' yesno
	ren `var' `var'r
}
About these ads

Entry filed under: Uncategorized. Tags: , , .

Data collection If it ain’t broke

1 Comment

  • 1. statatheleft  |  August 19, 2009 at 11:15 am

    Don’t think you actually need the loop here. Replacing the foreach block with the code at the end of this comment should be a bit faster and cut out a line of code. Requires that you install -renvars- first, which is a very useful command for renaming many variables at once.

    *Start Code*
    recode $yesnovars (2=0)
    lab val $yesnovars yesno
    renvars $yesnovars, postfix(r)
    *End code*


The Culture Geeks

Recent Posts


Follow

Get every new post delivered to your Inbox.

Join 2,099 other followers

%d bloggers like this: