Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: percentages


From   [email protected]
To   [email protected]
Subject   st: percentages
Date   Sun, 29 Apr 2007 20:00:38 -0700

Dear list

I want me to create a "liberal" variable and a "conservative" variable by
isolating the people who score in the top 25th percentile in a composite personal freedoms variable and the bottom 25th percentile in a capitalism variable, using various questions from NES.

One person told me to use

gen liberal = 1 if capitalism< pctx & personal > pctx
recode liberal .=0

where the x after pct (percentage) would be 75%

However, the pct command is not a function.

Do you know how I would get the result I wanted in stata?

Thanks,

Chris
*
* 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