# Re: st: multivariate normal regression with ml, linear form

 From "Martin Weiss" To Subject Re: st: multivariate normal regression with ml, linear form Date Wed, 18 Feb 2009 20:34:11 +0100

```<>

```
Stata does return "15-1" for me, pretty much what you asked for - in a pretty complicated way.
```
Also see http://www.stata-journal.com/article.html?article=pr0045

HTH
Martin
_______________________
```
----- Original Message ----- From: "Carlo Fezzi" <c.fezzi@uea.ac.uk>
```To: <statalist@hsphsun2.harvard.edu>
Sent: Wednesday, February 18, 2009 8:26 PM
Subject: RE: st: multivariate normal regression with ml, linear form

```
```Thanks Maarten,

```
Sound really a good idea! Just a follow up question. I am trying to check what the code does and therefore look into the macro `u_k' to make sure it contains what I want. In this simple case I want it to contain "u1 u2 u3". So I am typing:
```
-----
clear

scalar u1 = 1
scalar u2 = 5
scalar u3 = -1

local u_k "u1"

forvalues i = 2/3 {
local u_k "`u_k' u`i'"
display `u_k'
}

display `u_k'
-----

```
Why when I ask Stata to display the macro content inside the loop it works fine but when I ask it just after the loop, Stata does not return any value?
```
```
I guess this is probably a naive question from a beginner Stata programmer, sorry!
```
Cheers

Carlo

-----Original Message-----
```
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
```Sent: 18 February 2009 13:33
To: stata list
Subject: RE: st: multivariate normal regression with ml, linear form

--- Carlo Fezzi wrote:
```
```I don’t know how to define the args. For example, if it is a bivariate
equations it would be mu1 mu2 lnsigma1 lnsigma2 r12, but for a 4 or 5
equations model it would have of course more arguments. I guess it could
be a function of the global var neq, but I don’t know which is the
correct way to specify the args.
```
```
variables in a global \$S_k and the file dirifit_lf.ado started with:

*! MLB 1.0.0 23 Mar 2006
program dirifit_lf
version 8.2

local alpha_k "ln_alpha1"
forvalues i = 2/\$S_k {
local alpha_k "`alpha_k' ln_alpha`i'"
}

args lnf `alpha_k'

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

*
*   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/

*
*   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/

```
```
*
*   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/
```