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

Re: st: RE: Can I convert (-1-+1) variables into (0-1) variables?


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: RE: Can I convert (-1-+1) variables into (0-1) variables?
Date   Fri, 15 Jul 2005 11:49:37 +0100 (BST)

Scott Merryman replied:

> Kit Baum answered this question last week:
>
> "As your 7th grade algebra teacher probably told you,
>
> z = x/2 + 5  will take x {-10,10} into the range {0, 10}.
>
> set obs 21
> g x = -11 + _n
> g z = x/2 + 5
> list"
>
> In this case the transformation is z = (x + 1)/2.
>
> clear
> set obs 41
> g x = (-21 + _n)/20
> g z = (x + 1)/2
> list

Thanks Scott - I must have missed that!

CLIVE NICHOLAS        |t: 0(044)7903 397793
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

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