[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Date: Fri, 20 May 2005 11:16:47 +0200
You have the basic information in the variable
you call -content-. The most direct attack
I can think of is to -recode- to fewer categories.
Something like this:
recode content (1 2 = 2) (4 5 = 4), gen(content2)
> This is part of an extremely convoluted code I wrote in an attempt to
> process some data. On an excel file there is a question about the
> lesson content of a course. The participants had the option of
> answering this question with five answers (strongly agree, agree,
> neither, disagree, strongly disagree). I am attempting to find the
> percentages of participants who generally agree, are neutral, or
> disagree. Any help or suggestions would be greatly appreciated!
> Lessontontent~o is the name of the variable from excel that
> to the data
> label data "Response Data"
> label define content 1 "Strongly agree" 2 "Agree" 3 "Neither agree
> nor disagree" 4 "Disagree" 5 "Strongly disagree"
> encode lessoncontent~o, gen(content)
> drop if missing(content)
> g agree = 1 if (content == 1) | (content == 2)
> tabulate agree
> g neutral = 2 if (content == 3)
> tabulate neutral
> g notagree = 3 if (content == 4) | (content == 5)
> tabulate notagree
> g lessoncontent = agree & neutral & notagree
> tab lessoncontent
* For searches and help try: