Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: RE: postfile, using variable name not value or label

From   "Martin Weiss" <>
To   <>
Subject   st: RE: postfile, using variable name not value or label
Date   Mon, 26 Apr 2010 19:47:49 +0200


Why not -update- to 10.1, btw? Still:

sysuse auto, clear             
tempname hdle
postfile `hdle' str15 var mean using info.dta, replace
  qui foreach var of varlist rep78 length weight{
  		su `var', mean
 		 post `hdle' ("`var'") (r(mean))
  postclose `hdle'
u info, clear
l, abbrev(12) noobs sep(0)



-----Original Message-----
[] On Behalf Of Karen Wright
Sent: Montag, 26. April 2010 19:37
Subject: st: postfile, using variable name not value or label

Dear All,

I am using Stata 10.0 and have written the following code.


foreach j in 1000 750 500 400 300 250 200 150 {
	use "E:\Small Clusters Paper\INIS datasets\INIS.0.04.`j'.dta", clear
	foreach var of varlist b24age_lm_coef-n24delay_2_lm_coef {
		summ `var', det
		post INIS_coef (4) (`j') (`var') (r(mean)) (r(p5)) (r(p95))


However I was wondering how I would be able to -post- the name of the
variable in question rather than the value of the variable?   I have
searched the FAQ and archive but have not found how to post the variable
name and not the label.

Thank you,

The Institute of Cancer Research: Royal Cancer Hospital, a charitable
Company Limited by Guarantee, Registered in England under Company No. 534147
with its Registered Office at 123 Old Brompton Road, London SW7 3RP.

This e-mail message is confidential and for use by the addressee only.  If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer and network.

*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index