Statalist The Stata Listserver

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

Re: st: three tiny queations

From   Maarten buis <>
Subject   Re: st: three tiny queations
Date   Thu, 22 Feb 2007 20:17:57 +0000 (GMT)

--- Xiaoheng Zhang <> wrote:
> 1.Could I speicfy a precision level to certain digit for the
> outcome?Say 4-digit after decimal point?
> 2.Could STATA display 0 before decimal point for the outcome?

You can't in the imediate output from an estimation command, but you
can use -estimates table- or the user writen command -estout-. For the
former see -help estout-, and the example below:

*---------- begin example ----------
sysuse auto, clear
reg mpg price foreign
est store a
est table a, b(%9.4f) se(%9.3f)
*--------- end example -----------

> 3.How to use "if" for the string variables.For example,I have a
> variable "nationality" having two values-EU or US.How can I
> construct a condition started with if,like "if nationality==EU"?

if nationality == "EU"

Hope this helps,

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail.
*   For searches and help try:

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