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 at the end of May, and its replacement, statalist.org 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 <ementzakis@gmail.com>
To   statalist@hsphsun2.harvard.edu
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

Regards
Manos


*** 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'
end

bootstrap _b, reps(2): ddd
*
*   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/


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