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]

Re: st: Outputing variables values in to a file


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Outputing variables values in to a file
Date   Fri, 28 Sep 2012 00:34:04 +0100

Looks like two nested loops with a -display- statement in the middle.

Nick

On Fri, Sep 28, 2012 at 12:11 AM, Pradipto Banerjee
<[email protected]> wrote:

> Suppose I have N columns & M rows of data in a Stata dta file like this:
>
>
>        c1       c2      ... cN
>
> r1      3       4       ... 6
> r2      1       2       ... 7
> .       .       .       ....
> .       .       .       ....
> rM      3       9       ... 1
>
>
> I want to output a text file with as follows:
>
> line 1 is "3 w1 + 1 w2 + .... + 3 Wm >= 1"
> line 2 is "4 w1 + 2 w2 + .... + 9 Wm >= 1"
> .
> Line N is "6 w1 + 7 w2 + ... + 1 Wm >= 1"
>
> Can someone help me about how to write/output such a text file?
>
*
*   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