Statalist The Stata Listserver


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

Re: st: gen x = _n


From   "Raphael Fraser" <[email protected]>
To   [email protected]
Subject   Re: st: gen x = _n
Date   Fri, 17 Feb 2006 19:44:49 -0500

Thank you! Just one question. Why couldn't I think of that? (rhetorical)

On 2/17/06, Richard Williams <[email protected]> wrote:
> At 06:25 PM 2/17/2006, you wrote:
> >Dear All,
> >
> >I have two variables as listed below type and adjct. However, I would
> >like to create the variable
> >x. Can anyone assist?
> >
> >type  adjct   x
> >  0       50      1
> >  1       650    1
> >  0       80      2
> >  1       600    2
> >  0       100    3
> >  1       500    3
> >
> >Regards,
> >Raphael
>
> gen x = round(_n/2)
>
>
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> FAX:    (574)288-4373
> HOME:   (574)289-5227
> EMAIL:  [email protected]
> WWW (personal):    http://www.nd.edu/~rwilliam
> WWW (department):    http://www.nd.edu/~soc
>
> *
> *   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/
>

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