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

st: RE: RE: RE: postfile and post using a large number of items


From   Lee Sieswerda <Lee.Sieswerda@tbdhu.com>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: postfile and post using a large number of items
Date   Thu, 12 Jun 2003 18:11:01 -0400

David,
If by "streets" you mean those strips of asphault criss-crossing the milder
parts of this country, then you can go about 7 hours north of Thunder Bay to
Pickle Lake before the pavement ends (providing you don't run your truck
into a moose on the way - which I have, twice), which is a distance that
dwarfs several European countries. However, if you take a more egalitarian
view of what constitutes a street, then you can go all the way to Hudson
Bay. In winter, you just have to ensure that you pack a good supply of
batteries and enough food for your dog team. And in summer, you just need a
canoe large enough to handle a 45 gallon drum of DEET and a very large
sausage.

Regards,
Lee

Lee Sieswerda, Epidemiologist
Thunder Bay District Health Unit
Lee.Sieswerda@tbdhu.com


-----Original Message-----
From: Smith, David W. [mailto:SmithD2@uthscsa.edu] 
Sent: Thursday, June 12, 2003 4:01 PM
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: RE: RE: postfile and post using a large number of items


Dear Lee, Thank you that is helpful.

I was once in Thunder Bay.  I drove west from Michigan to Victoria and back.
My wife asked if there was anything north of there.  I said it depended on
whether you insisted on streets to get there.

Regards,

David Smith

David W. Smith, Ph.D., M.P.H.
Associate Professor, Biometry

The University of Texas
Health Science Center at Houston
School of Public Health
San Antonio Regional Campus

street address:
8550 Data Point, Suite 200
San Antonio, TX 78229

mail address:
7703 Floyd Curl Dr., Mail Code 7976
San Antonio, TX  78229-3900

voice: (210)567-3560, fax: (210) 567-5942
e-mail at Houston: david.w.smith@uth.tmc.edu
e-mail at San Antonio: smithd2@uthscsa.edu




-----Original Message-----
From: Lee Sieswerda [mailto:Lee.Sieswerda@tbdhu.com]
Sent: Wednesday, June 11, 2003 4:58 PM
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: RE: postfile and post using a large number of items


This is perhaps an oblique answer to your question. One solution to
extracting what you want from a matrix is to cycle through the matrix using
a -forvalues- loop and matrix subscripting, storing the results as macros,
and posting them as you go. Silly example with auto data:


...first set up tempfile, tempname, postfile, etc....
svyset [weight=weight]
svytab rep78 foreign, se

matrix myV = e(V)
matrix myb = e(b)

* The number of columns in the matrix will equal 
* the number of cells in the table
local n = colsof(myb)

forvalues x = 1/`n' {
	local df = e(df_r)
	local N = e(N)
	local se = sqrt(myV[`x',`x'])
	local est = myb[1,`x']

	post blah blah blah
}

This example produces a dataset with all of the proportions and standard
errors from the -svytab- table.

Regards,
Lee

Lee Sieswerda, Epidemiologist
Thunder Bay District Health Unit
Lee.Sieswerda@tbdhu.com



-----Original Message-----
From: Smith, David W. [mailto:SmithD2@uthscsa.edu] 
Sent: Wednesday, June 11, 2003 4:23 PM
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: postfile and post using a large number of items


I would like to use postfile and post with a large number of items, such as
the rates and covariance matrix after svytab.  Is it possible to specify the
items as vectors in order to save space and reduce errors?

Thanks,

David


David W. Smith, Ph.D., M.P.H.
Associate Professor, Biometry

The University of Texas
Health Science Center at Houston
School of Public Health
San Antonio Regional Campus
e-mail at Houston: david.w.smith@uth.tmc.edu
e-mail at San Antonio: smithd2@uthscsa.edu

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