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: calling do files


From   SCHOUMAKER Bruno <[email protected]>
To   [email protected]
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

[email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index