[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: collapse prob

From   "Martin Weiss" <>
To   <>
Subject   st: collapse prob
Date   Tue, 20 May 2008 10:10:21 +0200

Dear Statalisters,

In this example, does your Stata complain about a "name conflict" as well?

webuse college, clear
collapse (mean) gpa (median) gpa [fw=number], by(year)

In effect, you cannot calculate two statistics for the same variable without
renaming one of the results. This is mentioned in [D] collapse at the bottom
of page 48, but rather cursorily. And correct me if I am wrong, but there is
just no way you could have these statistics renamed in the dialog box. You
must first find out that you have the problem I am describing, and second
edit the command line to 

webuse college, clear
collapse (mean) meangpa=gpa (median) mediangpa=gpa [fw=number], by(year)

to make this work. It took me quite some time to find that out...

Martin Weiss

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen

Fon: 0049-7071-2978184




*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index