I have a question about Stata I am hoping one of you can answer. Is there
some way of calculating the mean or the median of a variable that does not
involve using the command "collapse (mean)" or "collapse (median). Once I
use collapse, stata clears the original data out of the work space,
which is annoying.
I have a variable dpi, which stores household income. First I want
to calculate the median income for the entire dataset. Then I want to
disaggregate the households by region and calculate the regional medians.
Lastly, I want to calculate the ratio of the regional medians to the
national median.
I have tried:
collapse (median) natm = dpi
collapse (median) regm = dpi, by(region)
But after the first command, Stata doesn't seem to recognize the variable
name dpi anymore. I could load the original dataset again, but that
seems so cumbersome for a relative simple operation (I can do it easily
in R!!). Any ideas?
Thanks,
Nirmala
all,
does anyone know how to place the abstract on top of Page 1 rather than on a
separate page? Help will be appreciated.
i hope that all of you are working on Gov 1000. ^0^
yongwook
-----------------------------
Yongwook Ryu
PhD Candidate
Department of Government
Harvard University
Tel:617-493-3397
Email: yryu(a)fas.harvard.edu
-----------------------------
there are 3 papers missing due to technical problems with the disk. the
authors pls email a copy to me. thanks.
Tao Li
--------------
www.people.fas.harvard.edu/~li7
Forget \usepackage{fullpage} because the top margin is only 0.5
inches...instead use:
\topmargin = 10 mm
\oddsidemargin = 0 mm
\evensidemargin = 0 mm
\headheight = 0 mm
\headsep = 0 mm
\textheight = 210 mm
\textwidth = 165 mm
for 1 inch margins all around.
To double-space,
\usepackage{doublespace}
Yours,
Olivia.
I have included the code for a table I am working on for another class;
however I'm having two problems. The second and third columns contain the
same number of characters yet one is way larger than the other. I want
them to be the same size.
Second problem is trying to include footnotes in the table. Using
\footnotemark is not working within the caption of the chart?
Any help would be appreciated as I am about 3 or 4 frustrating errors away
from doing the document in Word Perfect.
Thanks,
Andrew
\documentclass{article}
%==decimal align package==%
\usepackage{dcolumn}
\newcolumntype{.}{D{.}{.}{-1}}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}
\begin{table}[htb]
\caption{Political Campaign Services Rendered by Public Relations Counseling
Frims in Connection with Nomination and Election Camaigns for Public Office,
1952-1957, Responses from 130 Firms \footnotemark}
\begin{center}
\begin{tabular}{l|.|.}
\hline
&\multicolumn{2}{|c}{Firms Performing Indicated}\\
\multicolumn{1}{c|}{Service} &\multicolumn{2}{|c}{Service(of 130 Responding)}\\
\cline{2-3}
&\multicolumn{1}{|c|}{No.} &\multicolumn{1}{|c}{Percent\footnotemark}\\ \hline
Service of Some Kind & 78 & 60\\
Type of service performed:& &\\
\hspace{.3in} Arrangement of adverstising space or air time & 57 & 44\\
\hspace{.3in} Preparation of publicity materials, speech writing, etc. &66&51\\
\hspace{.3in} Counseling on strategy or tactics of campaign issues & 70 & 54\\
\hspace{.3in} Fundraising & 36 & 28\\
\hspace{.3in} Over-all campaign management & 41 & 32\\
\hspace{.3in} Other & 14& 11\\
Rendered service for more than one political party& 28 & 22\\\hline
\end{tabular}
\end{center}
\label{datsum}
\end{table}
\end{document}
Stanislav Markus writes:
> Dear Dave, Gary, Tao,
>
> I remember Dave pointing out in one of the homeworks that extreme
> observations (say dprct below 0.3 and over 0.7) should be excluded from
> the dataset during cleaning - I wonder why such reduction in n is
> justifiable ex ante, before, say, looking at the distribution of
> residuals.
It is not necessarily justified. I *think* that we did it bacause that is what
they did in GK and the first step was to replicate their results.
Other issues to think about in this context (as always) is precisely what you
are trying to estimate. For GK it was incumbency advantage is *contested*
elections. We might all agree that any election in which no Republican runs is
not "contested". But what about an election in which a Republican runs, but he
gets only 1% of the vote? Is that election meaningfully contested? Probably
not. In most such cases, the Republican candidate isn't really a professional
politician, just someone who thought it would be fun to see his name on the
ballot.
The difficult part is then deciding where to draw the line.
In my mind, the key, however, is to do the analysis with various definitions of
"contested" and then reporting to the reader (either in a table or a footnote,
depending on how interesting the result is) what impact this has on your key
quantity of interest. In the articles we read for the last class, you could see
lots of examples of this sort of stuff, where the authors said, "We tried this
and that and the other thing, but the results were largely the same." Of
course, you can only say this if it is true.
Dave
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
All:
Does anyone know why, using the "pa" bibliography style, the InBook
references might not work? I'm getting things like
"Wash.D.C.: CQ Press Chapter State Legislature"
when it should change fonts, punctuate, or do something to set off the
chapter "State Legislature". I suspect it shouldn't include the word
"chapter" either...
Thanks!
Ryan
------------------------------------------
Ryan T. Moore ~ Government & Social Policy
Ph.D. Candidate ~ Harvard University
Hey folks,
Have any of you figured out how to label the actual plotted line. For
example, if I am plotting two lines on the same graph, it would be
convenient to have little labels next to them like Fig 3 in GK.
- N