1. There is no class on Monday (President's day), so please feel free to go
skiing instead. We will have section on Thursday as usual.
2. Additional clarification on homework submission: those attending the
second section on Thursday can simply turn in their hardcopy at 6PM, but you
should post your code and an ecopy of your write-up into the web-dropbox by
5PM (so contrary to popular belief you don't gain an extra hour to work on
the PS by attending the later section).
3. Currently the second section is less packed than the first one so please
feel free to switch to the later one.
Have a great weekend,
Jen[n,s]
Hi,
I am looking for a partner with an interest in International Health/ Quality
of care. I have a dataset which could be looked at or we can look at
another. I am a first year PhD student in the Health Policy doctoral program
(GSAS) and have a background in statistics and methods, but am new to R.
Please contact me should you be interested.
best
Aaka
> <http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l>
>
>
I'm also a long distance student. I'm at Harvard School of Public Health, Department of Society, Human Development and Health. My research interests are health policy for the elderly, health inequality (social epidemiology). I think we can co-work by e-mail. I'd like to focus on trend in health behaviors and Socioeconomic Class Disparities. International comparison study might be possible for the same subject. What do you think about my subject? Do you have any other plan? please let me know your idea.
Sincerely,
Soong-Nang Jang
>>> Keith Schnakenberg <keith.schnakenberg at gmail.com> 02/12/08 10:44 ?? >>>
I am a long-distance student looking for a potential co-author. I
understand that long-distance co-authorships may be difficult, but I
am very excited about doing this replication project. I'm hoping to
find someone in this course who is either living in Southern
California or is willing to expend the extra effort to work with a
partner on a long-distance basis. Obviously this would be pending
approval from the instructors.
Relevant information about me:
I'm a first-year MA student in political science at San Diego State
University, preparing to enter a PhD program. I am also doing a large
chunk of my classwork at UCSD. My research interests are comparative
politics, political economy, and political institutions, but I can
learn to be interested in anything. I have a substantial background
in statistics, matrix algebra, and some calculus. I have not used R
before this class, but I am proficient with most other commonly used
packages and I'm working overtime to learn R. I work hard and I've
never murdered a co-author.
Feel free to reply on this list or email me privately:
keith.schnakenberg at gmail.com
Thanks,
Keith Schnakenberg
_______________________________________________
gov2001-l mailing list
gov2001-l at lists.fas.harvard.eduhttp://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Task 1:
a) Build a vector (with for 7 elements)
c
(1,2,3,4,7,8,6) ->x
Calculate the mean
sum
(x)/length (x)
same
results as
mean(x)
c
(1,2,3,4,7,8,6) ->x
sum
(x)/length (x)
mean(x)
-------------------------------------------------------------------------
b)
c
(1,2,3,4,7,8,6) ->x
sort(x)
(length (x)
+1)/2->z
x[z]
in matlab
function m = median(v, n) % Subfunction% Calculate median.w = sort(v);if rem(n, 2) == 1 m = w((n+1) / 2);else m = (w(n/2) + w(n/2+1)) / 2;
end
-------------------------------------------------------------------------------
Task 2:
a)
mat <- matrix(0:0, nrow=100, ncol=100)
x.stat <- rep (0,100)
for (i in 1:100){
y<-sample (1000,100)
a <- matrix(y, nrow = 100, ncol = 100) }
b)
daten <- matrix(runif(10000),100,100)
par(mfrow=c(5,5))
for (nummer in 1:25 ) { hist(daten[,
nummer])}
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
Please always send coding questions to the list directly. You will get better and faster help there because there are many students that know the right answer (like John, Jon, Albert, and Jeremy that just provided excellent answers to Keith's question).
To answer your question, there are many ways in R to check if a number is even or odd. For example, if x is your scalar (such as the length of a vector) you could use:
ifelse(x %% 2, "action if x is odd", "action if x is even")
Notice that x %% y asks for x mod y, so x %% 2 will return 1 (TRUE) if x is odd and 0 (FALSE) if x is even, and ifelse() then implements one of two possible actions.
Check:
??%%?
?ifelse
For details. Hope this helps.
Jens
---------------------------------------------------------------
I have a question on 0.1b. This is what I have so far but I am stuck as to how to determine if the length of the vector is even or odd:
newmed <- function(a) {
mediodd <- a[trunc(length(a)/2)+1]
mediev <- (a[length(a)/2]+a[length(a)/2+1])/2
if (length(a) is odd) return(mediodd)
if (length(a) is even) return(mediev)
}
Am I doing this in the right way?
Hi all,
I think I'll also join this line. I'm a third-year at Harvard College,
concentrating in economics and government. My research focuses on the
political economy of Africa, particularly on the issues of ethnic
identification and development policy. But I'm also very interested in
other areas of economics, like behavioral and social modeling, as well
as various topics in comparative politics.
Let me know if you're interested!
Thanks,
Joe
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joseph P. Luna
Harvard College, Class of 2009
Cambridge, MA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi all,
I am a 2nd-year PhD student at Sloan, MIT, in the Organization Studies Group.
Looking for a partner... Sociology of education, org. stuff, or other sociology
would be interesting for me. Also open to other fields, if needed. (It feels
like an ad on Craigslist...)
Please let me know if you are interested! Thanks!
stella
Hi,
I am also at HSPH in the population and international health department and I have access to a dataset on occupational hazards and social hazards in the workplace (discrimination, abuse etc...). The authors of the data have published descriptive studies on those hazards seperately and we can attempt to replicate one of them and push it further by looking at the clustering of both types of hazards in relation to some health outcome. Does this seem interesting to anyone? Stella, this is not exactly what you are interested in but a sociological perspective can be very enriching to these kinds of analyses.
Afamia
>>> Stella Kounelaki <stellak at mit.edu> 02/12/08 7:28 PM >>>
The international development people paired up, the health people should pair
up... i think I am left with somebody who studies epidemiology... no offense,
but that is a rather far stretch from sociology...
(To repeat: I am doing organization studies at Sloan, MIT - PhD student in my
2nd year. I am interested in org. studies, sociology, and sociology of
education.)
thanks,
stella
Quoting Aakanksha Pande <apande at fas.harvard.edu>:
> Hi,
> I am looking for a partner with an interest in International Health/ Quality
> of care. I have a dataset which could be looked at or we can look at
> another. I am a first year PhD student in the Health Policy doctoral program
> (GSAS) and have a background in statistics and methods, but am new to R.
> Please contact me should you be interested.
>
> best
> Aaka
>
>> <http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l>
>>
>>
>
_______________________________________________
gov2001-l mailing list
gov2001-l at lists.fas.harvard.eduhttp://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Professor King,
Could you clarify what the difference is between the final project and
research paper assignments.
I am an extension school student who takes the class strictly online.
What does the final project consist of?
If I choose to stay with the project, does that mean I do not have to do a
research paper?
Dmitriy Shnypko