Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: name conflict in posting a matrix

From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: name conflict in posting a matrix
Date   Tue, 10 Jul 2012 17:07:10 +0200

On Tue, Jul 10, 2012 at 4:11 PM, Emmanouil Mentzakis wrote:
> I think the problem is that I don’t tell -ereturn- correctly that I
> have two equations with the same covariates (I try to rename them
> using -matrix coleq-) and it therefore sees the same covariates names
> appear multiple times, hence the name conflict. However, I often
> models in Stata use the same covariates in multiple equations and
> naming them with a prefix similar to eq1 etc.

*------------------------- begin example ------------------------------
clear all
sysuse auto

program define toboot, eclass
    tempname b
    reg price mpg foreign
    matrix `b' = e(b)
    reg rep78 mpg foreign
    matrix `b' = `b', e(b)
    matrix colnames `b' = price:mpg price:foreign price:_cons ///
                          rep78:mpg rep78:foreign rep78:_cons
	ereturn post `b'

bootstrap _b, reps(100) :toboot
*-------------------------- end example -------------------------------

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index