stargazer summary statistics by group

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

stargazer summary statistics by group

Sebastien Bihorel
Hi,

I saw a post on this topic on stackoverflow a while ago. It does not
seem to have got any reply... Just trying my luck here.

Is there any way to use stargazer to create a table of descriptive
statistics by group such as the one below?

Thanks

#-------------|-Stat--|--A--|--B--|--Overall-|
# Variable 1  | Stat1 |     |     |          |
#-------------|-------|-----|-----|----------|
#             | Stat2 |     | |          |
#-------------|-------|-----|-----|----------|
#             | ...   |     |     |          |
#-------------|-------|-----|-----|----------|
# Variable 2  | Stat1 |     |     |          |
#-------------|-------|-----|-----|----------|
#             | Stat2 |     | |          |
#-------------|-------|-----|-----|----------|
#             | ...   |     |     |          |
#-------------|-------|-----|-----|----------|
# Variable ...| Stat1 |     |     |          |
#-------------|-------|-----|-----|----------|
#             | Stat2 |     | |          |
#-------------|-------|-----|-----|----------|
#             | ...   |     |     |          |
#-------------|-------|-----|-----|----------|

stat1 and stat2 could mean, sd, median, etc...

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: stargazer summary statistics by group

Boris Steipe
Does this entry on the Stargazer Cheatsheet come close enough to what you want?
   http://jakeruss.com/cheatsheets/stargazer.html#the-default-summary-statistics-table

B.

On Mar 6, 2016, at 3:34 PM, sbihorel <[hidden email]> wrote:

> Hi,
>
> I saw a post on this topic on stackoverflow a while ago. It does not seem to have got any reply... Just trying my luck here.
>
> Is there any way to use stargazer to create a table of descriptive statistics by group such as the one below?
>
> Thanks
>
> #-------------|-Stat--|--A--|--B--|--Overall-|
> # Variable 1  | Stat1 |     |     |          |
> #-------------|-------|-----|-----|----------|
> #             | Stat2 |     | |          |
> #-------------|-------|-----|-----|----------|
> #             | ...   |     |     |          |
> #-------------|-------|-----|-----|----------|
> # Variable 2  | Stat1 |     |     |          |
> #-------------|-------|-----|-----|----------|
> #             | Stat2 |     | |          |
> #-------------|-------|-----|-----|----------|
> #             | ...   |     |     |          |
> #-------------|-------|-----|-----|----------|
> # Variable ...| Stat1 |     |     |          |
> #-------------|-------|-----|-----|----------|
> #             | Stat2 |     | |          |
> #-------------|-------|-----|-----|----------|
> #             | ...   |     |     |          |
> #-------------|-------|-----|-----|----------|
>
> stat1 and stat2 could mean, sd, median, etc...
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: stargazer summary statistics by group

Sebastien Bihorel
Hi Boris,

Sorry, but not really. The example that comes closest is "Flip the table
axes" but this is not right either.

In the design that I need, the year, month, day, etc... variables would
each get a block of rows with statistics (mean, sd, median, min, max)
provided for each level of another variable, these levels being reported
in columns.

Basically, I need to look at descriptive statistics that are stratified.
Does this make sense?

Sebastien

On 3/6/2016 4:04 PM, Boris Steipe wrote:

> Does this entry on the Stargazer Cheatsheet come close enough to what you want?
>     http://jakeruss.com/cheatsheets/stargazer.html#the-default-summary-statistics-table
>
> B.
>
> On Mar 6, 2016, at 3:34 PM, sbihorel <[hidden email]> wrote:
>
>> Hi,
>>
>> I saw a post on this topic on stackoverflow a while ago. It does not seem to have got any reply... Just trying my luck here.
>>
>> Is there any way to use stargazer to create a table of descriptive statistics by group such as the one below?
>>
>> Thanks
>>
>> #-------------|-Stat--|--A--|--B--|--Overall-|
>> # Variable 1  | Stat1 |     |     |          |
>> #-------------|-------|-----|-----|----------|
>> #             | Stat2 |     | |          |
>> #-------------|-------|-----|-----|----------|
>> #             | ...   |     |     |          |
>> #-------------|-------|-----|-----|----------|
>> # Variable 2  | Stat1 |     |     |          |
>> #-------------|-------|-----|-----|----------|
>> #             | Stat2 |     | |          |
>> #-------------|-------|-----|-----|----------|
>> #             | ...   |     |     |          |
>> #-------------|-------|-----|-----|----------|
>> # Variable ...| Stat1 |     |     |          |
>> #-------------|-------|-----|-----|----------|
>> #             | Stat2 |     | |          |
>> #-------------|-------|-----|-----|----------|
>> #             | ...   |     |     |          |
>> #-------------|-------|-----|-----|----------|
>>
>> stat1 and stat2 could mean, sd, median, etc...
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

--
Sebastien Bihorel
Associate Director, Pharmacometrics
Buffalo Office: +1-716-633-3463 ext. 323 | Website
<http://www.cognigencorp.com>
<http://www.simulations-plus.com/Default.aspx>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: stargazer summary statistics by group

Jeff Newmiller
Maybe what you really want is the tables package.
--
Sent from my phone. Please excuse my brevity.

On March 6, 2016 4:45:58 PM PST, sbihorel <[hidden email]> wrote:

>Hi Boris,
>
>Sorry, but not really. The example that comes closest is "Flip the
>table
>axes" but this is not right either.
>
>In the design that I need, the year, month, day, etc... variables would
>
>each get a block of rows with statistics (mean, sd, median, min, max)
>provided for each level of another variable, these levels being
>reported
>in columns.
>
>Basically, I need to look at descriptive statistics that are
>stratified.
>Does this make sense?
>
>Sebastien
>
>On 3/6/2016 4:04 PM, Boris Steipe wrote:
>> Does this entry on the Stargazer Cheatsheet come close enough to what
>you want?
>>    
>http://jakeruss.com/cheatsheets/stargazer.html#the-default-summary-statistics-table
>>
>> B.
>>
>> On Mar 6, 2016, at 3:34 PM, sbihorel
><[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> I saw a post on this topic on stackoverflow a while ago. It does not
>seem to have got any reply... Just trying my luck here.
>>>
>>> Is there any way to use stargazer to create a table of descriptive
>statistics by group such as the one below?
>>>
>>> Thanks
>>>
>>> #-------------|-Stat--|--A--|--B--|--Overall-|
>>> # Variable 1  | Stat1 |     |     |          |
>>> #-------------|-------|-----|-----|----------|
>>> #             | Stat2 |     | |          |
>>> #-------------|-------|-----|-----|----------|
>>> #             | ...   |     |     |          |
>>> #-------------|-------|-----|-----|----------|
>>> # Variable 2  | Stat1 |     |     |          |
>>> #-------------|-------|-----|-----|----------|
>>> #             | Stat2 |     | |          |
>>> #-------------|-------|-----|-----|----------|
>>> #             | ...   |     |     |          |
>>> #-------------|-------|-----|-----|----------|
>>> # Variable ...| Stat1 |     |     |          |
>>> #-------------|-------|-----|-----|----------|
>>> #             | Stat2 |     | |          |
>>> #-------------|-------|-----|-----|----------|
>>> #             | ...   |     |     |          |
>>> #-------------|-------|-----|-----|----------|
>>>
>>> stat1 and stat2 could mean, sd, median, etc...
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>
>--
>Sebastien Bihorel
>Associate Director, Pharmacometrics
>Buffalo Office: +1-716-633-3463 ext. 323 | Website
><http://www.cognigencorp.com>
><http://www.simulations-plus.com/Default.aspx>
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: stargazer summary statistics by group

Mitchell Maltenfort
https://cran.r-project.org/web/packages/tableone/index.html might help

On Sunday, March 6, 2016, Jeff Newmiller <[hidden email]> wrote:

> Maybe what you really want is the tables package.
> --
> Sent from my phone. Please excuse my brevity.
>
> On March 6, 2016 4:45:58 PM PST, sbihorel <
> [hidden email] <javascript:;>> wrote:
> >Hi Boris,
> >
> >Sorry, but not really. The example that comes closest is "Flip the
> >table
> >axes" but this is not right either.
> >
> >In the design that I need, the year, month, day, etc... variables would
> >
> >each get a block of rows with statistics (mean, sd, median, min, max)
> >provided for each level of another variable, these levels being
> >reported
> >in columns.
> >
> >Basically, I need to look at descriptive statistics that are
> >stratified.
> >Does this make sense?
> >
> >Sebastien
> >
> >On 3/6/2016 4:04 PM, Boris Steipe wrote:
> >> Does this entry on the Stargazer Cheatsheet come close enough to what
> >you want?
> >>
> >
> http://jakeruss.com/cheatsheets/stargazer.html#the-default-summary-statistics-table
> >>
> >> B.
> >>
> >> On Mar 6, 2016, at 3:34 PM, sbihorel
> ><[hidden email] <javascript:;>> wrote:
> >>
> >>> Hi,
> >>>
> >>> I saw a post on this topic on stackoverflow a while ago. It does not
> >seem to have got any reply... Just trying my luck here.
> >>>
> >>> Is there any way to use stargazer to create a table of descriptive
> >statistics by group such as the one below?
> >>>
> >>> Thanks
> >>>
> >>> #-------------|-Stat--|--A--|--B--|--Overall-|
> >>> # Variable 1  | Stat1 |     |     |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> #             | Stat2 |     | |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> #             | ...   |     |     |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> # Variable 2  | Stat1 |     |     |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> #             | Stat2 |     | |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> #             | ...   |     |     |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> # Variable ...| Stat1 |     |     |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> #             | Stat2 |     | |          |
> >>> #-------------|-------|-----|-----|----------|
> >>> #             | ...   |     |     |          |
> >>> #-------------|-------|-----|-----|----------|
> >>>
> >>> stat1 and stat2 could mean, sd, median, etc...
> >>>
> >>> ______________________________________________
> >>> [hidden email] <javascript:;> mailing list -- To UNSUBSCRIBE
> and more, see
> >>> https://stat.ethz.ch/mailman/listinfo/r-help
> >>> PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >>> and provide commented, minimal, self-contained, reproducible code.
> >
> >--
> >Sebastien Bihorel
> >Associate Director, Pharmacometrics
> >Buffalo Office: +1-716-633-3463 ext. 323 | Website
> ><http://www.cognigencorp.com>
> ><http://www.simulations-plus.com/Default.aspx>
> >
> >______________________________________________
> >[hidden email] <javascript:;> mailing list -- To UNSUBSCRIBE and
> more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] <javascript:;> mailing list -- To UNSUBSCRIBE and
> more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


--
Sent from Gmail Mobile

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: stargazer summary statistics by group

Sebastien Bihorel
Thanks for the suggestions. I will look into these packages.

On 3/6/2016 9:08 PM, Mitchell Maltenfort wrote:

> https://cran.r-project.org/web/packages/tableone/index.html might help
>
> On Sunday, March 6, 2016, Jeff Newmiller <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Maybe what you really want is the tables package.
>     --
>     Sent from my phone. Please excuse my brevity.
>
>     On March 6, 2016 4:45:58 PM PST, sbihorel
>     <[hidden email] <javascript:;>> wrote:
>     >Hi Boris,
>     >
>     >Sorry, but not really. The example that comes closest is "Flip the
>     >table
>     >axes" but this is not right either.
>     >
>     >In the design that I need, the year, month, day, etc... variables
>     would
>     >
>     >each get a block of rows with statistics (mean, sd, median, min, max)
>     >provided for each level of another variable, these levels being
>     >reported
>     >in columns.
>     >
>     >Basically, I need to look at descriptive statistics that are
>     >stratified.
>     >Does this make sense?
>     >
>     >Sebastien
>     >
>     >On 3/6/2016 4:04 PM, Boris Steipe wrote:
>     >> Does this entry on the Stargazer Cheatsheet come close enough
>     to what
>     >you want?
>     >>
>     >http://jakeruss.com/cheatsheets/stargazer.html#the-default-summary-statistics-table
>     >>
>     >> B.
>     >>
>     >> On Mar 6, 2016, at 3:34 PM, sbihorel
>     ><[hidden email] <javascript:;>> wrote:
>     >>
>     >>> Hi,
>     >>>
>     >>> I saw a post on this topic on stackoverflow a while ago. It
>     does not
>     >seem to have got any reply... Just trying my luck here.
>     >>>
>     >>> Is there any way to use stargazer to create a table of descriptive
>     >statistics by group such as the one below?
>     >>>
>     >>> Thanks
>     >>>
>     >>> #-------------|-Stat--|--A--|--B--|--Overall-|
>     >>> # Variable 1  | Stat1 |     |     |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> #             | Stat2 |     | |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> #             | ...   |     |     |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> # Variable 2  | Stat1 |     |     |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> #             | Stat2 |     | |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> #             | ...   |     |     |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> # Variable ...| Stat1 |     |     |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> #             | Stat2 |     | |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>> #             | ...   |     |     |          |
>     >>> #-------------|-------|-----|-----|----------|
>     >>>
>     >>> stat1 and stat2 could mean, sd, median, etc...
>     >>>
>     >>> ______________________________________________
>     >>> [hidden email] <javascript:;> mailing list -- To
>     UNSUBSCRIBE and more, see
>     >>> https://stat.ethz.ch/mailman/listinfo/r-help
>     >>> PLEASE do read the posting guide
>     >http://www.R-project.org/posting-guide.html
>     >>> and provide commented, minimal, self-contained, reproducible code.
>     >
>     >--
>     >Sebastien Bihorel
>     >Associate Director, Pharmacometrics
>     >Buffalo Office: +1-716-633-3463 ext. 323 | Website
>     ><http://www.cognigencorp.com>
>     ><http://www.simulations-plus.com/Default.aspx>
>     >
>     >______________________________________________
>     >[hidden email] <javascript:;> mailing list -- To
>     UNSUBSCRIBE and more, see
>     >https://stat.ethz.ch/mailman/listinfo/r-help
>     >PLEASE do read the posting guide
>     >http://www.R-project.org/posting-guide.html
>     >and provide commented, minimal, self-contained, reproducible code.
>
>             [[alternative HTML version deleted]]
>
>     ______________________________________________
>     [hidden email] <javascript:;> mailing list -- To UNSUBSCRIBE
>     and more, see
>     https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
>     http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>
>
> --
> Sent from Gmail Mobile

--
Sebastien Bihorel
Associate Director, Pharmacometrics
Buffalo Office: +1-716-633-3463 ext. 323 | Website
<http://www.cognigencorp.com>
<http://www.simulations-plus.com/Default.aspx>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.