Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: error message- invalid syntax

From   samirkc <[email protected]>
To   [email protected]
Subject   Re: st: Re: error message- invalid syntax
Date   Tue, 09 Nov 2004 17:01:50 +0100

Thanks. Now this is running.

Michael Blasnik wrote:

see -help return-. It tells you that you need to tell Stata what kind of result to return. You probably want -return scalar bssamir =...

You can suppress the output of summarize using quietly (quietly summarize ....), or in the example you give, you can just use the meanonly option which automatically supresses the output (summairze ..., meanonly) and also works a little faster.

Michael Blasnik
[email protected]

----- Original Message ----- From: "samirkc" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 09, 2004 10:43 AM
Subject: st: error message- invalid syntax

dear statalisters,
I am trying to bootstrap the output (icer) of following program and i am writing program for the first time. But whenever i run this program by typing bssamir, it gives four tables of command summarize but at the end there is an error message " invalid syntax". The program goes like this:

program bssamir, rclass
version 8.2
summarize difqol if group == 0
local e0 = r(mean)
summarize difqol if group == 1
local e1 = r(mean)
summarize tcost if group == 0
local c0 = r(mean)
summarize tcost if group == 1
local c1 = r(mean)
return bssamir = (`c1' - `c0')/ (`e1' - `e0')

Please suggest what is wrong with my program. Also, how to run it without any output tables.
Thank you

*   For searches and help try:

*   For searches and help try:

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