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]

st: Results to file problem

From   "arosella" <>
Subject   st: Results to file problem
Date   Thu, 6 Dec 2012 09:50:04 +0100

Hi All,
I'm using Stata 12.1 on W7 and trying to write a txt file
after the command -dstdize-
Here my code:

webuse hbp
generate pop=1
file open myfile1 using "E:\Alberto\tab_sep.txt", write replace
set more off
file write myfile1  "Tasa Cruda" _tab "Tasa Ajustada" ///
                  _tab  "SE Tasa Ajus"   _tab  "LowerCI" ///
                  _tab  "UpperCI"
dstdize hbp pop age race sex, by(city year)
file write myfile1  (r(crude)) ///
              _tab  (r(adj))   ///
        _tab  (r(se))    ///
        _tab  (r(lb))    ///
        _tab  (r(ub))

file close myfile1
set more on

And here the erro I get:

. file write myfile1  (r(crude)) ///
>               _tab  (r(adj))   ///
>                       _tab  (r(se))    ///
>                       _tab  (r(lb))    ///
>                       _tab  (r(ub))
type mismatch
Can I get you help?
Thank you

Alberto R. Osella
Laboratorio di Epidemiologia e Biostatistica
IRCCS Saverio de Bellis
Via Turi, 27
70013 Castellana Grotte (BA)
tel: +39 0804994655
fax: +39 0804994650

*   For searches and help try:

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