0

I'd like to export fit statistics (log likelihood, AIC, BIC) to a table in dta format. I can display fit statistics after fitting the model (created using strsmix) easily enough using estimates stats, or estat ic, but I can't seem to find a way to write that to a proper .dta file.

I have the same problem with exporting the variance covariance matrix. I can display it using estat vce, but I can't see to find a way to export it.

jrdnmdhl
  • 1,935
  • 18
  • 26
  • one thing you could do is use `mat2txt` or `putexcel` from scc with matrices and then load the text/excel file into Stata – Eric HB Apr 27 '17 at 19:37
  • Thanks for the suggestion. I was able to find a solution extracting the matrix without going through excel format, though I still need to figure out how to preserve labels. – jrdnmdhl Apr 27 '17 at 20:15

1 Answers1

0

Figure out a solution that works OK, but doesn't seem to preserve labels.

estat ic
matrix fit = r(S)
estat vce
matrix vce = r(V)
clear
svmat double fit, name(fit)
save fit.dta, replace
clear
svmat double vce, name(vce)
save vce.dta, replace
clear
jrdnmdhl
  • 1,935
  • 18
  • 26