Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Date: Fri, 20 May 2005 11:16:47 +0200


From   "Sinha, Ashish" <[email protected]>
To   <[email protected]>
Subject   st: Date: Fri, 20 May 2005 11:16:47 +0200
Date   Fri, 20 May 2005 05:17:04 -0400 (EDT)

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 corresponds
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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index