Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Patricia Biedermann <pati.stat@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Summarize data |

Date |
Sat, 9 Jun 2012 14:43:18 +0200 |

Oh! I got the mistake! Sorry for that! But still one question remains! So far I have the mean of the rows... > egen row_mean = rowmean(Q1A Q2A Q3) > list Q1A Q2A Q3A row_mean Is there a possibility to receive ONE MEAN of several columns(=variables) ? Thank you On Sat, Jun 9, 2012 at 1:23 PM, Patricia Biedermann <pati.stat@gmail.com> wrote: > Hello! > Thank you for your answer! > > I tried this command: > > egen row_mean = rowmean(Q1A Q2A Q3) > list Q1A Q2A Q3A > > but I just get a table and I need actual values. and how do I sort it > by groups? (if group==1 ????) > > Sorry, I'm still quite new to STATA but I'm glad for any help! > > Thank you. > > On Fri, Jun 8, 2012 at 8:30 PM, Nick Cox <njcoxstata@gmail.com> wrote: >> -egen- offers a bundle of functions (in its own sense) for summarising >> rowwise. You can apply -if- and/or -in-. >> >> Nick >> >> On Fri, Jun 8, 2012 at 5:46 PM, Patricia Biedermann <pati.stat@gmail.com> wrote: >> >>> I need to summarize data in the following way: >>> >>> My questionnaire looks like that: >>> >>> Question 1 option1 option2 option3 (options >>> are numeric 1-5) >>> >>> Question 2 >>> >>> Question 3 >>> >>> Etc. (up to 16 question in the same structure) >>> >>> The database in Stata looks like that: >>> >>> ID Q1A Q1B Q1C Q2A Q2B Q3B …ETC (GROUP) >>> >>> Respectively option1 of question 1 represents Q1A >> >>> Now I want to summarize the data of all questionnaires in that way: >>> >>> - summarize (mean) option 1 for ALL QUESTIONS AND ALL >>> questionnaires (mean of Q1A, Q2A, Q3A,...etc) >>> >>> - summarize (mean) option 2 etc…(mean of Q1B, Q2B, Q3B,...etc) >>> >>> So, maybe the solution is simpler then I think or my database is >>> crap…but can anyone help me to figure out the right commands? (I >>> already tried sum and collapse commands...) >>> >>> Is there also a possibility to summarize it by grouping (same >>> questionnaires, but e.g. different location of interview…) >> >> * >> * 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/

**Follow-Ups**:**Re: st: Summarize data***From:*Nick Cox <njcoxstata@gmail.com>

**References**:**st: Summarize data***From:*Patricia Biedermann <pati.stat@gmail.com>

**Re: st: Summarize data***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: Summarize data***From:*Patricia Biedermann <pati.stat@gmail.com>

- Prev by Date:
**Re: st: Summarize data** - Next by Date:
**Re: st: gllamm missing cut points** - Previous by thread:
**Re: st: Summarize data** - Next by thread:
**Re: st: Summarize data** - Index(es):