Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: calling do files


From   SCHOUMAKER Bruno <bruno.schoumaker@uclouvain.be>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: calling do files
Date   Fri, 23 Jul 2010 10:40:03 +0200

Hello,

Have you tried defining local macros in separate do files, include the do files containing the macros in you main do file, and then use the macros in the nlcom ? I guess it should work (not sure though - and would be interested if someone has another solultion)

If your nonlinear combination has a simple strcture like _b1[/b1]+_b2[/b2]+...

you can also create it with a loop, ex.

local s1="s1 = _b1[/b1]+"
forval i=2 to 100 {
local s1 `s1' "_b" `i' "[/b" `i' "]+"
}

and then use `s1' (and `s2', `s3',...) in the nlcom (and the same for s2)

That would considerably shorten your do file.

Hope this helps


Bruno


Le 23/07/2010 9:34, kibrom a écrit :
Hi all,
I was trying to extract coefficients and their standard errors using the
nlcom command. But I am working with a big system so could not put all my
commands in a single do file due to size limit. Is there any way of doing
nlcom command for coefficients I can only put in two or more do files. In
other words, in one do file I have

nlcom (s1: (_b1[/b1]+_b2[/b2]+...))

and in another do file I have
(s2: (_a1[/a1]+_a2[/a2]))

I don't want to run two nlcom commands in separate do files, rather I want
to execute the command from the first do file somehow calling do file 2.

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


--
Bruno SCHOUMAKER

Centre de recherche en démographie et sociétés
Université catholique de Louvain
1-17 PLace Montesquieu
1348 Louvain-la-Neuve
BELGIUM

Tel. +32 10 474136
Fax. +32 10 472952

bruno.schoumaker@uclouvain.be
www.uclouvain.be/demo

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index