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 on April 23, and its replacement, 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 <>
Subject   Re: st: calling do files
Date   Fri, 23 Jul 2010 10:40:03 +0200


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


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:


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

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

*   For searches and help try:

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