On Mon, 29 Sep 2008, Allin Cottrell wrote:
> So I thought this kind of thing could be done once and for all
> via a command. The patch you'll find attached[*] implements a
> "modprint" command...
This seems very useful to me: it's now added in CVS.
Ok, everyone. Allin waved his magic wand and right now in CVS we have a
few changes:
1) The order of the arguments to modprint has changed: it's now
coefficients/parameter names/(optionally) extra stats
2) the varname() function has been extended to list arguments, and it
returns a comma-separated mega-string with all the names of the variables
in the list.
As a consequence,
a) you'd better run a full cvs checkout
b) the example script I had supplied in my earlier message should be
modified as follows:
<script>
function my_ols(series y, list X)
ols y X -q
A = $coeff ~ $stderr
string s = varname(X)
B = { $rsq ; $nobs }
string s += ",R2,obs"
modprint A s B
end function
nulldata 100
b = muniform(3,2)
s = "foo,bar,baz"
modprint b s
y = normal()
x = normal()
list X = const x
ols y X --simple
my_ols(y,X)
</script>
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti