Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: est package


From   Ben Jann <[email protected]>
To   [email protected]
Subject   Re: st: est package
Date   Tue, 5 May 2009 12:31:29 +0200

> 1) creating landscape rtf using esttab ??

Do you mean a table where models are in rows and coefficients are in
columns? This is not directly supported but some suggestions can be
found at

http://repec.org/bocode/e/estout/advanced.html#advanced907

> 2) Creating mutiple columns and combining them into one
> supermatrix-g-, so that in the end one doesnt have to write out all
> the variables in the p local ?? instead one could write esttab g ??

I am not sure whether I understand right. What would speak against
maintaining a local or global macro that holds the names? Such as:

global mymodels ""
foreach g of local p {
  ...
  eststo univariat`g'
  ...
  eststo multivariat`g'
  global mymodels $models  univariat`g'  multivariat`g'
}
esttab $mymodels using ...

Note that -eststo- also maintains such a namelist and that -esttab-
will pick the list up if no names are supplied. That is, you could
simply type

eststo clear
foreach g of local p {
  ...
  eststo univariat`g'
  ...
  eststo multivariat`g'
}
esttab using ...

ben

On Mon, May 4, 2009 at 7:17 PM, moleps islon <[email protected]> wrote:
> Is there any way of
> 1) creating landscape rtf using esttab ??
> 2) Creating mutiple columns and combining them into one
> supermatrix-g-, so that in the end one doesnt have to write out all
> the variables in the p local ?? instead one could write esttab g ??
>
>
> local p "a b c d e"
>
> foreach g of local p {
>
>        local r "hosp age sex_en primary optype"
>
>        local t=0
>        foreach x of local r {
>                di"`x'"
>                logistic `g' `x',vce(robust)
>                eststo e`t'
>                local elist `elist' e`t'
>
>                local t=`t'+1
>
>                }
> eststo univariat`g': appendmodels `elist'
> logistic mors_30 `r'
> eststo multivariat`g'
> }
>
> esttab univariata multivariata univariatb multivariatb....multivariate
> using unimulti`g'.rtf, nonumbers eform ci(2) ar2 b(a2) label title
> ("Time to death") mtitle replace modelwidth(6) varwidth(10)
>
> regardsm,
> *
> *   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/
>

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index