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]

st: name conflict in posting a matrix

From   Emmanouil Mentzakis <>
Subject   st: name conflict in posting a matrix
Date   Mon, 9 Jul 2012 20:53:44 +0100

Dear all,

I am trying to -ereturn post- a matrix in order to bootstrap it but
get an error. I d be grateful if anyone could point to my mistake.
Below is an example.

Thank you


*** Example ***

sysuse auto,clear

cap prog drop ddd
program ddd, eclass
	tempname b1 b2 b3 betas
	reg price foreign, nocons
	local s1=1
	mat `b`s1''=e(b)
	matrix coleq `b`s1'' = eq`s1'

	reg price foreign, nocons
	local s2=2
	mat `b`s2''=e(b)
	matrix coleq `b`s2'' = eq`s2'

	local s3=3
	mat `b`s3''=1

	mat `betas' = `b1', `b2', `b3'
	ereturn post `betas'

bootstrap _b, reps(2): ddd
*   For searches and help try:

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