Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: name conflict in posting a matrix
From
Emmanouil Mentzakis <[email protected]>
To
[email protected]
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/