I want to export results of a two-way anova to an Excel sheet. I'd be happy to export essentially what appears in the "Results" pane, but at least want to export SS df F Prob>F and R2. The following code gets me close
but I can't figure out how to include the r2.
Very open to approaches that don't involve collect.
Thank you for any help.
Code:
collect clear collect: anova max_performance_at_step exp_level opt_level exp_level#opt_level collect label levels term 1.exp_level "exp_level", modify collect style cell result[p], nformat(%9.4f) collect label levels term 1.opt_level "opt_level", modify collect label levels term 1.exp_level#1.opt_level "exp_level#opt_level", modify collect layout (term[Model 1.exp_level 1.opt_level 1.exp_level#1.opt_level Residual]) (result[SS df ms F p r2])
Code:
--------------------------------------------------------
| SS df F statistic Prob>F
--------------------+-----------------------------------
Model | 43.27497 8 199.7384 0.0000
exp_level | 40.05307 2 739.4701 0.0000
opt_level | .1526113 2 2.81755 0.0598
exp_level#opt_level | 3.069288 4 28.33299 0.0000
Residual | 3436.497 126891
--------------------------------------------------------
Very open to approaches that don't involve collect.
Thank you for any help.

Comment