I am trying to add a 0 to my coefficient vector and variance matrix using -ereturn repost-:
Code:
clear
version 15.1
sysuse auto, clear
reg price mpg
* Defines eclass program to repost
cap program drop myrepost
program define myrepost, eclass
mat ob=e(b)
* Add a 0 to b
mat badd=0
mat colnames badd= `1'
mat bb = [ob,badd]
* Add a 0 to V
mat VV = e(V)
mat addcol = J(rowsof(VV),1,0)
mat colnames addcol = `1'
mat VV = [VV,addcol]
mat addrow = J(1,colsof(VV),0)
mat rownames addrow = `1'
mat VV = [VV \ addrow]
* Repost
ereturn repost b=bb V=VV, resize rename
end
myrepost newcoef
Code:
option resize not allowed r(198);
I am on Stata 15.1 06 Jun 2018 on Windows 8.1 Enterprise.
Thank you,
0 Response to -ereturn repost, resize- displays "resize option not allowed"
Post a Comment