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

st: RE: Concatenating datasets that actually exist! (Was RE: st: RE: bar graph of multiple variables)


From   "Sherman, Richard" <[email protected]>
To   <[email protected]>
Subject   st: RE: Concatenating datasets that actually exist! (Was RE: st: RE: bar graph of multiple variables)
Date   Fri, 11 Mar 2005 11:37:12 +0100

Dear Clive and others on the list,

Nick Cox's March 8 suggestion on how to construct a single bar graph of
multiple variables, which drew on Clive's and Scott Merryman's
suggestions, does just what I wanted to do--it places a number of bar
graphs of categorical variable frequencies side by side on a single x
axis.

-Richard

Clive Nicholas wrote:

--------------------------------------
Sorry for the delay in response! Well, the suggested change worked, but
it
only got me as far as:

. *Create data set: 7 variables with values {1, 2, 3}
. clear

. set obs 30
obs was 0, now 30

. qui {

.
. *Create frequency values
. qui {

.
. dsconcat `file1' `file2' `file3' `file4' `file5' `file6' `file7'
file C:\Documents.dta not found
r(601);

end of do-file
r(601);

Is this odd, considering that the lines

qui {
forv i = 1/7 {
        tempfile file`i'
        xcontract c`i', freq(freq) idnum(`i')  saving("`file`i''")
}
}

creates and prepares the seven tempfiles for -dsconcat-? Being a
programming dunce, I'm clearly missing something obvious. I'm only
pursuing this, by the way, because Richard Sherman's original problem is
an interesting one for me as well.
-----------------------------------------------
Richard Sherman
Department of Political Science, Leiden University
Leiden, Netherlands
http://homepage.mac.com/richard.sherman/

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index