Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: set obs by level (of multiple variables)?


From   Tim Evans <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: set obs by level (of multiple variables)?
Date   Thu, 17 Jan 2013 15:08:56 +0000

Hi all,

I'm trying to insert extra observations in my dataset - I've calculated survival and wish to graph the results but the data start from less than 100%, but I'd like the graph to graph from time 0 and thus 100%. My dataset is split by gender and stage so I need something that inserts an observation for say males & stage 1, males stage 2, females stage 1 and females stage 2.

Unfortunately, while this will provide me with an observation

set obs `=_N+1' it does not support this:

bysort stage sex: set obs `=_N+1'

Does anyone have an idea how I might do this in Stata 11.2?

Best wishes

Tim



_DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index