search for: hainmuel

Displaying 9 results from an estimated 9 matches for "hainmuel".

2005 Oct 13
3
Optim with two constraints
Hi R-list, I am new to optimization in R and would appreciate help on the following question. I would like to minimize the following function using two constraints: ###### fn <- function(par,H,F){ fval <- 0.5 * t(par) %*% H %*% par + F%*% par fval } # matrix H is (n by k) # matrix F is (n by 1) # par is a (n by 1) set of weights # I need two constraints: # 1.
2004 Mar 08
1
drawing filled countries according to data using map('world')? - follow up
...te.to.map, year == 1980] : incorrect number of dimensions > color <- dv[state.to.map, year == 1980]/100 Error in dv[state.to.map, year == 1980] : incorrect number of dimensions What am I doing wrong? (there are a few values missing in "fix.float") Thanks for your help! Best Jens Hainmueller
2005 Apr 21
2
local average
Hello, probably this isn't hard, but I can't get R to do this. Thanks for your help! Assume I have a matrix of two covariates: n <- 1000 Y <- runif(n) X <- runif(n,min=0,max=100) data <- cbind(Y,X) Now, I would like to compute the local average of Y for each X interval 0-1, 1-2, 2-3, ... 99-100. In other words, I would like to obtain 100 (local) Ybars, one for each
2006 Aug 04
2
why does lm() not allow for negative weights?
Dear List, Why do commonly used estimator functions (such as lm(), glm(), etc.) not allow negative case weights? I suspect that there is a good reason for this. Yet, I can see reasonable cases when one wants to use negative case weights. Take lm() for example: ### n <- 20 Y <- rnorm(n) X <- cbind(rep(1,n),runif(n),rnorm(n)) Weights <- rnorm(n) # Includes Pos and Neg Weights Weights
2004 Mar 09
0
Re: R-help Digest, Vol 13, Issue 8
...3. Re: graphic device MetaPost (Gabor Grothendieck) > 4. Re: graphic device MetaPost (Itay Furman) > 5. applying data generating function (Fred J.) > 6. missing values (Grace Conlon) > 7. drawing filled countries according to data using > map('world')? (Jens Hainmueller) > 8. Re: missing values (Peter Dalgaard) > 9. RE: applying data generating function (Phineas Campbell) > 10. Re: applying data generating function (Christophe Pallier) > 11. Re: applying data generating function (Spencer Graves) > 12. Frequency ploygon help (Robert W....
2004 Mar 09
1
vector extraction
Hello, I could need some help on this one: >From the data.frame "Test.dataset2" below (TSCS data for 151 "countries.to.map" for "year" 1973-95; each "country.to.map" is described by a unique code), I would like to extract a vector "color" that for each "country.to.map" takes on the value of "dv" (a categorical variable with
2004 Sep 15
1
control of font size & colour for title, subtitles, axis, and tick marks in LATTICE graph
Hi, I very much appreciate any help on this "fine tuning" problem in a lattice graph (I am new to LATTICE and could not find an example in the help files that worked for me. My apologies if I missed it there). I am running the following box plots to compare conditional distributions of x at different levels of y under two treatment conditions ID=1 (upper panel ) & ID=0 (lower panel
2004 Dec 16
1
help with multiple imputation using imp.mix
I am desperately trying to impute missing data using 'imp.mix' but always run into this yucky error message to which I cannot find the solution. It's the first time I am using mix and I'm trying really hard to understand, but there's just this one step I don't get...perhaps someone knows the answer? Thanks! Jens My code runs:
2005 Nov 29
0
sensitivity tests fo causal inference
Hi all, Following up on Holger's email last week: Does anyone know if there exists a library that implements the sensitivity tests for hidden bias for matched pairs and unmatched groups as proposed in Rosenbaum's Observational Studies (2002: ch.4)? Thanks. Best, jens