Statalist The Stata Listserver


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

Re: st: three tiny queations


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: three tiny queations
Date   Thu, 22 Feb 2007 20:17:57 +0000 (GMT)

--- Xiaoheng Zhang <zhangx@tcd.ie> 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

-----------------------------------------
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

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


		
___________________________________________________________ 
Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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