dhopkins(a)fas.harvard.edu writes:
> Dear Dave,
>
> For another class, I am looking at public opinion data, and especially at the
> relationships between sets of opinions. (i.e. do people who exhibit opposition
> to certain racial policies also tend to be anti-tax?) Articles I have read
> seem to approach this problem in one of a few ways, including "probit models"
> or "factor analysis." I was curious if there were any articles/authors you
> would recommend I consult to learn more about these models/techniques.
A perfectly good question for the class list. Perhaps others are interested.
"probit" is a way of handling cases where the dependent variable is 0/1. A
similar way is logistic regression. See Netter chapter 14. There is also an
on-line chapter for Moore and McCabe.
My personal opinion is that factor analysis is way more trouble than it is
worth, especially if you care about causal effects. My favorite introduction to
that world is:
Johnson, R.A. and D.W.Wichern (1992). Applied multivariate statistical
analysis, 3 rd edition, Prentice Hall, Englewood Cliffs. NJ, USA.
although I think that there is a 4th edition.
Dave
> Many thanks--and happy holidays!
>
> Best,
> Dan
>
>
>
>
--
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
Anna Lorien Nelson writes:
> Hi Dave, Gary, and Tao,
>
> Could you confirm that the term length is 2 yrs. in each state we're dealing
> with?
Confirmed.
Dave
> I assume that most (or all) lower houses in state governments have 2-
> year terms, but I've been looking around online and haven't actually been able
> to find that information. The way the data looks suggests all 14 states have 2-
> year terms, but I don't want to be somehow overlooking anything basic.
>
> Many thanks,
> Anna
>
> --
> Anna Lorien Nelson
> Department of Government,
> Harvard University
> alnelson(a)fas.harvard.edu
>
>
--
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
A reasonable question.
For some reason, your function does not like NA values.
> cleaner(c(1, NA))
Error in if (vec[j] == 3) { : missing value where logical needed
>
Since your vector has NA's in it, your function fails.
The nreason it fails is that your vec[j] == 3 construction does not like NA
values. Or, rather, it returns an NA as an answer (reasonable enough) to if,
which must get a TRUE/FALSE. Hence the error message.
> if(3 == 3){cat("Good\n")}
Good
> if(NA == 3){cat("Good\n")}
Error in if (NA == 3) { : missing value where logical needed
Something like explicitly testing for both NA and 3 would work.
> x <- c(1, 3, 4)
> x[is.na(x) | x == 3] <- NA
> x
[1] 1 NA 4
> x <- c(NA, 3, 4)
> x[is.na(x) | x == 3] <- NA
> x
[1] NA NA 4
>
Note how I test for the NA first, so that the "or" returns true without testing
the second half.
Dave
Ryan Thomas Moore writes:
>
> I have written a simple function, cleaner, to change 3's into NA's in a
> vector. It appears to work:
>
> > x1 <- c(2,3,4,3)
> > x1
> [1] 2 3 4 3
> > cleaner(x1)
> [1] 2 NA 4 NA
> > is.vector(x1)
> [1] TRUE
>
> However, it doesn't work with another vector:
>
> > x2 <- x$incumb.68
> > summary(x2)
> Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
> 0.000 1.000 1.000 1.194 2.000 3.000 25.000
> > cleaner(x2)
> Error in if (vec[j] == 3) { : missing value where logical needed
> > is.vector(x2)
> [1] TRUE
>
> Here is the code for cleaner:
>
> cleaner <- function(vec){
> for(j in 1:(length(vec)))
> {if(vec[j] == 3) {vec[j] <- NA}}
> return(vec)
> }
>
> I apologize for asking such an explicit question during the exam, but
> my code has worked in identical circumstances before, and I'm at wit's end.
> I understand if this is not a legal question.
>
> Thanks,
> Ryan
>
> ------------------------------------------
> Ryan T. Moore ~ Government & Social Policy
> Ph.D. Candidate ~ Harvard University
>
>
--
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
Thank you for pointing this out. It was my mistake.
Dave
Ryan Thomas Moore writes:
>
> Teachers:
>
> I think there's a small mistake in the README file. It says "Montana",
> but Missouri is MO, and the state code in that file (34) is Missouri's.
> I'm sure this won't change anything.
>
> Interestingly, the DMV made the same mistake on my car registration!
> Maybe there's a different system up here... :)
>
> Ryan
>
> ------------------------------------------
> Ryan T. Moore ~ Government & Social Policy
> Ph.D. Candidate ~ Harvard University
>
>
--
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
On Tue, 17 Dec 2002 dhopkins(a)fas.harvard.edu wrote:
> Dear Dave, Gary, and Tao,
>
> One quick question about the final: although you mention that we should
> not do any outside research, it would seem critical to know when these
> states performed redistricting. Best I can tell, that information is
> not available in either the raw text files or the README file, although
> I may be mistaken. How best to proceed? Should we assume that they
> redistrict in years ending in 0?
the final says you are welcome to make any assumptions that are necessary
but not filled it, and so you could do that here. but to make the exam a
bit more empirically realistic, here is a bit more data.
Gary
@ -------------------------------------------------------------------------
Key to state legislative elections datasets, with information on
the control of redistricting.
This file contains a list of the state abbreviation codes for states for
which legislative data exists in Gauss form (prefixed with an H for state
houses or an S for state senates), followed by a state
numerical code equal to the icpsr number plus 100 for state houses
and 200 for state senates. Then for each state, an election appears
as a code and then a year; the line is ended in a ".".
All state House and Senate with at least one election year with exclusively
single member, winner-take-all districts are included. MN is the exception,
since they have so many nonpartisan candidates and third parties.
Three separate lists of legislatures are included with labels as follows:
todoH = state houses
todoS = state senates without staggered terms
todoSS = state senates with staggered terms (see below for more info)
CODES:
L = Last election year held under a redistricting; or last year of data
R = "regular year," between redistrictings, not beginning or end of data
F* = First year of data; first year after redistricting
FL* = year was both first year of new district plan and last year before
a new districting plan,
OR
year was first year of data, and last year before new redistr plan
OR
year was first year of new redistr plan and last year of data
Where
* = suffix for F or FL included when redistricting occurs:
D = redistricting controlled by Democrats (FD or FLD)
R = redistricting controlled by Republicans (FR or FLR)
B = redistricting controlled by bipartisan compromise (FB or FLB)
? = redistricting occurred, control unclear (F? or FL?)
0 = no redistricting, just first year in dataset
(some) rules:
no R F
no L R
always begin with F* or FL*
always end with L or FL*
* = 0 is possible only in the first year for each state
source for time of redistricting: ICPSR state leg elections file codebook.
Other redistricting information: coded from state newspapers, letters from
and interviews with secretaries of state, state court judges, lawyers, and
partisans.
See RED.PRG for a Gauss program to format these data in more traditional
ASCII format.
NOTE: only state house information is used in this article. State senate
data is omitted
----------------------------------------------------------------------- @
@ state houses @
let todoH=
HAL 141 F0 74 R 78 L 82 FD 83 L 86 .
HCA 171 F0 68 R 70 L 72 FB 74 R 76 R 78 L 80 FD 82 R 84 R 86 L 88 .
HCO 162 F0 68 L 70 FR 72 R 74 R 76 R 78 L 80 FR 82 R 84 R 86 L 88 .
HCT 101 F0 68 L 70 FR 72 R 74 R 76 R 78 L 80 FD 82 R 84 R 86 L 88 .
HDE 111 F0 68 L 70 FR 72 R 74 R 76 R 78 L 80 FB 82 R 84 R 86 L 88 .
HFL 143 FD 82 R 84 R 86 L 88 .
HHI 182 FB 82 R 84 R 86 L 88 .
HIL 121 FL0 82 FD 84 R 86 L 88 .
HIA 131 FL0 68 FLR 70 FR 72 R 74 R 76 R 78 L 80 FR 82 R 84 R 86 L 88 .
HKS 132 F0 68 L 70 FLB 72 FB 74 R 76 L 78 FB 80 R 82 R 84 R 86 L 88 .
HKY 151 F0 69 L 71 FD 73 R 75 R 77 R 79 L 81 FD 84 R 86 L 88 .
HME 102 FB 78 R 80 L 82 FB 84 R 86 L 88 .
HMA 103 FD 74 L 76 FD 78 R 80 R 82 R 84 R 86 L 88 .
HMI 123 F0 68 L 70 FD 72 R 74 R 76 R 78 L 80 FR 82 R 84 R 86 L 88 .
HMS 146 FLD 79 FD 83 L 87 .
HMO 134 F0 68 L 70 FB 72 R 74 R 76 R 78 L 80 FB 82 R 84 R 86 L 88 .
HMT 164 FD 74 R 76 R 78 R 80 L 82 FD 84 R 86 L 88 .
HNV 165 FLB 72 FB 74 R 76 R 78 L 80 FB 82 R 84 R 86 L 88 .
HNM 166 F0 68 L 70 FB 72 R 74 R 76 R 78 L 80 FLD 82 FD 84 R 86 L 88 .
HNY 113 F0 68 L 70 FR 72 R 74 R 76 R 78 L 80 FB 82 R 84 R 86 L 88 .
HOH 124 F0 68 L 70 FD 72 R 74 R 76 R 78 L 80 FD 82 R 84 R 86 L 88 .
HOK 153 F0 68 L 70 FD 72 R 74 R 76 R 78 L 80 FD 82 R 84 R 86 L 88 .
HOR 172 FR 72 R 74 R 76 R 78 L 80 FR 82 R 84 R 86 L 88 .
HPA 114 F0 68 L 70 FB 72 R 74 R 76 R 78 L 80 FB 82 R 84 R 86 L 88 .
HRI 105 F0 68 R 70 L 72 FD 74 R 76 R 78 L 80 FD 82 R 84 R 86 L 88 .
HSC 148 FD 74 R 76 R 78 L 80 FD 82 R 84 R 86 L 88 .
HTN 154 FLD 72 FB 74 R 76 R 78 R 80 L 82 FB 84 R 86 L 88 .
HUT 167 F0 68 L 70 FB 72 R 74 R 76 R 78 L 80 FR 82 R 84 R 86 L 88 .
HVA 140 F0 83 R 85 R 87 L 89 .
HWI 125 F0 68 L 70 FB 72 R 74 R 76 R 78 L 80 FLB 82 FD 84 R 86 L 88 .
;
On Mon, 16 Dec 2002, Anna Lorien Nelson wrote:
> Hi Dave, Gary, and Tao,
>
> Though we briefly touched on "assignment mechanism" in class today, I am
> still unsure about the statistical issue this term identifies. Is the
> issue whether the research design has selected (assigned) on the
> dependent variable, which could confound results? Or is it something
> else?
this is the way the world generates/creates the values of your key causal
variable. its supposed to be generated nonstochatically (as per the
assumption of the CRM). if instead it is generated on the basis of Y,
then you have endogeneity, for example.
>
> I also wondered if you could clarify what you mean by "model
> dependence." Does this refer simply to a lack of robustness (i.e., the
> model is highly dependent upon its particular configuration of control
> variables) or does it mean something different?
yes, that's right. inferences would ideally not be based on any
assumptions, although that essentially never occurs. in practice, all
inferences are conditional on some model assumptions. analyses that
produce very different estimates of the quantities of interest are
dependent on the assumptions of the model. that's what we call model
dependent. it would be nice if your inferences weren't model dependent of
course, but it is always a good idea to map out the degree and extent to
which your inferences are indeed model dependent.
Gary
>
> Thanks for any help you can provide.
>
> Anna
>
Andrew J. Reeves writes:
> Dave, Tao,
Exam questions should be sent to me, Tao and Gary -- the final messes
that up.
> I'm poking around in the data, but I'm having a very confusing problem. Notice
> in the code below that I set the na.strings = -9; however it only codes some of
> the -9's as NA's (see the summary of the data below). Any suggestions as to
> what I'm doing wrong? I've tried "-9" instead of just -9, but I still have the
> same results.
The README is not as clear as it should be on this. Look closely at
the raw ASCII data (this is always good practice). Where did that min
value for dpct68 come from?
Dave
> Andrew
>
>
> > ca<-read.table("~/final/ca.asc", skip =1, col.names = c
> ("col", "dpct68", "dpct70", "dpct72", "dpct74","dpct76","dpct78","dpct80","dpct8
> 2","dpct84","dpct86","incumb68","incumb70","incumb72","incumb74","incumb76","inc
> umb78","incumb80","incumb82","incumb84","incumb86"), na.strings = -9)
> > summary(ca)
> col dpct68 dpct70 dpct72
> Min. : 1.00 Min. :-9.0000 Min. :0.2435 Min. :-9.0000
> 1st Qu.:20.75 1st Qu.: 0.2963 1st Qu.:0.3518 1st Qu.: 0.3879
> Median :40.50 Median : 0.4854 Median :0.5372 Median : 0.5774
> Mean :40.50 Mean : 0.2425 Mean :0.5326 Mean : 0.4364
> 3rd Qu.:60.25 3rd Qu.: 0.6310 3rd Qu.:0.6952 3rd Qu.: 0.7013
> Max. :80.00 Max. : 0.8914 Max. :1.0000 Max. : 1.0000
>
> dpct74 dpct76 dpct78 dpct80
> Min. :0.3045 Min. :-9.0000 Min. :0.0000 Min. :-9.0000
> 1st Qu.:0.4680 1st Qu.: 0.4551 1st Qu.:0.4446 1st Qu.: 0.4078
> Median :0.6124 Median : 0.5985 Median :0.5925 Median : 0.5597
> Mean :0.5886 Mean : 0.2311 Mean :0.5681 Mean : 0.4382
> 3rd Qu.:0.6874 3rd Qu.: 0.6997 3rd Qu.:0.6906 3rd Qu.: 0.6934
> Max. :1.0000 Max. : 1.0000 Max. :1.0000 Max. : 1.0000
>
> dpct82 dpct84 dpct86 incumb68
> Min. :-9.0000 Min. :-9.0000 Min. :0.0000 Min. :0.000
> 1st Qu.: 0.3768 1st Qu.: 0.2948 1st Qu.:0.3113 1st Qu.:1.000
> Median : 0.5573 Median : 0.5698 Median :0.5833 Median :1.000
> Mean : 0.3067 Mean : 0.4221 Mean :0.5244 Mean :1.397
> 3rd Qu.: 0.6942 3rd Qu.: 0.6957 3rd Qu.:0.7181 3rd Qu.:2.000
> Max. : 1.0000 Max. : 1.0000 Max. :0.8914 Max. :2.000
> NA's :2.000
> incumb70 incumb72 incumb74 incumb76 incumb78
> Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.0
> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:0.000 1st Qu.:1.000 1st Qu.:0.0
> Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.0
> Mean :1.387 Mean :1.190 Mean :1.012 Mean :0.961 Mean :0.9
> 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:1.000 3rd Qu.:1.0
> Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.0
> NA's :1.000 NA's :3.000
> incumb80 incumb82 incumb84 incumb86
> Min. :0.000 Min. :0.0000 Min. :0.000 Min. :0.000
> 1st Qu.:1.000 1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:1.000
> Median :1.000 Median :1.0000 Median :1.000 Median :1.000
> Mean :1.101 Mean :0.9872 Mean :1.354 Mean :1.175
> 3rd Qu.:2.000 3rd Qu.:2.0000 3rd Qu.:2.000 3rd Qu.:2.000
> Max. :2.000 Max. :2.0000 Max. :2.000 Max. :2.000
> NA's :1.000 NA's :2.0000 NA's :1.000
> > ca<-read.table("~/final/ca.asc", skip =1, col.names = c
> ("col", "dpct68", "dpct70", "dpct72", "dpct74","dpct76","dpct78","dpct80","dpct8
> 2","dpct84","dpct86","incumb68","incumb70","incumb72","incumb74","incumb76","inc
> umb78","incumb80","incumb82","incumb84","incumb86"), na.strings = "-9")
> > summary(ca)
> col dpct68 dpct70 dpct72
> Min. : 1.00 Min. :-9.0000 Min. :0.2435 Min. :-9.0000
> 1st Qu.:20.75 1st Qu.: 0.2963 1st Qu.:0.3518 1st Qu.: 0.3879
> Median :40.50 Median : 0.4854 Median :0.5372 Median : 0.5774
> Mean :40.50 Mean : 0.2425 Mean :0.5326 Mean : 0.4364
> 3rd Qu.:60.25 3rd Qu.: 0.6310 3rd Qu.:0.6952 3rd Qu.: 0.7013
> Max. :80.00 Max. : 0.8914 Max. :1.0000 Max. : 1.0000
>
> dpct74 dpct76 dpct78 dpct80
> Min. :0.3045 Min. :-9.0000 Min. :0.0000 Min. :-9.0000
> 1st Qu.:0.4680 1st Qu.: 0.4551 1st Qu.:0.4446 1st Qu.: 0.4078
> Median :0.6124 Median : 0.5985 Median :0.5925 Median : 0.5597
> Mean :0.5886 Mean : 0.2311 Mean :0.5681 Mean : 0.4382
> 3rd Qu.:0.6874 3rd Qu.: 0.6997 3rd Qu.:0.6906 3rd Qu.: 0.6934
> Max. :1.0000 Max. : 1.0000 Max. :1.0000 Max. : 1.0000
>
> dpct82 dpct84 dpct86 incumb68
> Min. :-9.0000 Min. :-9.0000 Min. :0.0000 Min. :0.000
> 1st Qu.: 0.3768 1st Qu.: 0.2948 1st Qu.:0.3113 1st Qu.:1.000
> Median : 0.5573 Median : 0.5698 Median :0.5833 Median :1.000
> Mean : 0.3067 Mean : 0.4221 Mean :0.5244 Mean :1.397
> 3rd Qu.: 0.6942 3rd Qu.: 0.6957 3rd Qu.:0.7181 3rd Qu.:2.000
> Max. : 1.0000 Max. : 1.0000 Max. :0.8914 Max. :2.000
> NA's :2.000
> incumb70 incumb72 incumb74 incumb76 incumb78
> Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.0
> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:0.000 1st Qu.:1.000 1st Qu.:0.0
> Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.0
> Mean :1.387 Mean :1.190 Mean :1.012 Mean :0.961 Mean :0.9
> 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:1.000 3rd Qu.:1.0
> Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.0
> NA's :1.000 NA's :3.000
> incumb80 incumb82 incumb84 incumb86
> Min. :0.000 Min. :0.0000 Min. :0.000 Min. :0.000
> 1st Qu.:1.000 1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:1.000
> Median :1.000 Median :1.0000 Median :1.000 Median :1.000
> Mean :1.101 Mean :0.9872 Mean :1.354 Mean :1.175
> 3rd Qu.:2.000 3rd Qu.:2.0000 3rd Qu.:2.000 3rd Qu.:2.000
> Max. :2.000 Max. :2.0000 Max. :2.000 Max. :2.000
> NA's :1.000 NA's :2.0000 NA's :1.000
> >
>
>
> > ca<-read.table("~/final/ca.asc", skip =1, col.names = c
> ("col", "dpct68", "dpct70", "dpct72", "dpct74","dpct76","dpct78","dpct80","dpct8
> 2","dpct84","dpct86","incumb68","incumb70","incumb72","incumb74","incumb76","inc
> umb78","incumb80","incumb82","incumb84","incumb86"), na.strings = "-9")
> > summary(ca)
> col dpct68 dpct70 dpct72
> Min. : 1.00 Min. :-9.0000 Min. :0.2435 Min. :-9.0000
> 1st Qu.:20.75 1st Qu.: 0.2963 1st Qu.:0.3518 1st Qu.: 0.3879
> Median :40.50 Median : 0.4854 Median :0.5372 Median : 0.5774
> Mean :40.50 Mean : 0.2425 Mean :0.5326 Mean : 0.4364
> 3rd Qu.:60.25 3rd Qu.: 0.6310 3rd Qu.:0.6952 3rd Qu.: 0.7013
> Max. :80.00 Max. : 0.8914 Max. :1.0000 Max. : 1.0000
>
> dpct74 dpct76 dpct78 dpct80
> Min. :0.3045 Min. :-9.0000 Min. :0.0000 Min. :-9.0000
> 1st Qu.:0.4680 1st Qu.: 0.4551 1st Qu.:0.4446 1st Qu.: 0.4078
> Median :0.6124 Median : 0.5985 Median :0.5925 Median : 0.5597
> Mean :0.5886 Mean : 0.2311 Mean :0.5681 Mean : 0.4382
> 3rd Qu.:0.6874 3rd Qu.: 0.6997 3rd Qu.:0.6906 3rd Qu.: 0.6934
> Max. :1.0000 Max. : 1.0000 Max. :1.0000 Max. : 1.0000
>
> dpct82 dpct84 dpct86 incumb68
> Min. :-9.0000 Min. :-9.0000 Min. :0.0000 Min. :0.000
> 1st Qu.: 0.3768 1st Qu.: 0.2948 1st Qu.:0.3113 1st Qu.:1.000
> Median : 0.5573 Median : 0.5698 Median :0.5833 Median :1.000
> Mean : 0.3067 Mean : 0.4221 Mean :0.5244 Mean :1.397
> 3rd Qu.: 0.6942 3rd Qu.: 0.6957 3rd Qu.:0.7181 3rd Qu.:2.000
> Max. : 1.0000 Max. : 1.0000 Max. :0.8914 Max. :2.000
> NA's :2.000
> incumb70 incumb72 incumb74 incumb76 incumb78
> Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.0
> 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:0.000 1st Qu.:1.000 1st Qu.:0.0
> Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.0
> Mean :1.387 Mean :1.190 Mean :1.012 Mean :0.961 Mean :0.9
> 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:1.000 3rd Qu.:1.0
> Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.000 Max. :2.0
> NA's :1.000 NA's :3.000
> incumb80 incumb82 incumb84 incumb86
> Min. :0.000 Min. :0.0000 Min. :0.000 Min. :0.000
> 1st Qu.:1.000 1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:1.000
> Median :1.000 Median :1.0000 Median :1.000 Median :1.000
> Mean :1.101 Mean :0.9872 Mean :1.354 Mean :1.175
> 3rd Qu.:2.000 3rd Qu.:2.0000 3rd Qu.:2.000 3rd Qu.:2.000
> Max. :2.000 Max. :2.0000 Max. :2.000 Max. :2.000
> NA's :1.000 NA's :2.0000 NA's :1.000
> >
>
> -~-~-~-~-~-~-~-~-~-~-~
> Andrew Reeves
> Ph.D. Candidate
> Department of Government,
> Harvard University
> reeves(a)fas.harvard.edu
>
> Perkins Hall #212
> 35 Oxford Street
> Cambridge, MA 02138
>
> 617.493.3485 tel.
> 301.639.8369 cell.
> -~-~-~-~-~-~-~-~-~-~-~
>
--
David Kane
Lecturer in Government
617-563-0122
dkane(a)latte.harvard.edu
In homework 8, question 1, what does this command do:
row.names(hw7data)<-seq(nrow(hw7data))
It's code used to clean that data, but I'm not sure exactly what it means.
Thanks,
Andrew
Dear Dave and Gary,
According to the answer key we were given for HW 8 #1, this question teaches us
very little about how to select a good model, which is presumably what the final
exam is going to be on. In fact, and I am quite confident that I'm speaking for
a plurality of the class on this issue, we are rather clueless as to how to find
a "good model." In HW7, we showed that 1. an interaction effect seems to be
relevant and 2. years as factors seem to be relevant. There was no connection
to how to appropriately incorporate these observations into a model. In HW8, we
essentially wasted a lot of time performing a trivial exercise because if we had
Tao's level of statistical fluency, we should have known that controlling for
more than 1 lag is a bad idea. This is certainly a useful insight (if generally
true) but it only tells us what not to include.
Therefore, could you give us some guidelines as to how we go about building a
good model? This can be done in an e-mail, but I think a good number of us
would like you to spend some time on Monday going over this.
Thanks,
Phillip.
-------------------------------------------------
Phillip Y. Lipscy
Perkins Hall Room #129
35 Oxford Street
Cambridge, MA 02138
(617)493-4893
lipscy(a)fas.harvard.edu
Ph.D. Candidate
Harvard University, FAS, Department of Government
-------------------------------------------------