Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Error message I don't understand

From   Neil Shephard <>
Subject   Re: st: Error message I don't understand
Date   Fri, 15 Oct 2010 15:41:50 +0000

On Fri, Oct 15, 2010 at 3:25 PM,  <> wrote:
> I have a long program to produce some simple tables, but get what seems to be an unrelated error message.   Could someone help me?
> Here are my commands:
>  sort cmanew;
> by cmanew: table vismin lf_act [weight = wt], c(sum counter) format f(9.0) col row center;
> Here is the error message:
> -> cmanew = Toronto.......
> (frequency weights assumed)
> factor variables and time-series operators not allowed

Try removing the square brackets that encapsulate your weight, they
are present in the syntax diagram for the -table- command to indicate
that the use of weights is optional, they are not  required when
actually invoking -table- with weights.

You also have a semi-colon at the end of the line which is probably unnecessary.

Your use of the -, format()- option doesn't look right to either as
you appear to be using it twice, once without specifying any actual
format and a second time you use the abbreviated form, but don't use
the correct format.

Finally you can combine the -sort- and -by- into one by using -bysort-, so try

bysort cmanew: table vismin lf_act weight = wt, c(sum counter)
format(%9.0) col row center


"Our civilization would be pitifully immature without the intellectual
revolution led by Darwin" - Motoo Kimura, The Neutral Theory of
Molecular Evolution

Email -
Website -
Photos -

*   For searches and help try:

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