[R] Iterative sampling with restrictions

2012-08-20 Thread David A. Kim
Hi all, I'm working on a seemingly trivial problem that I can't figure out how to implement in R. I'd be most grateful for any help here. I want to do the following: first, randomly assign each of n units to one of g groups of size n/g. Then, randomly re-assign each of the n units to a different

[R] Multiple equation models in time-series cross-section (panel) data

2012-04-19 Thread David A. Kim
Hello, Could anyone recommend a package for multiple (i.e., structurally linked) equation models for time-series cross-section data? I've been using the "plm" package for single-equation, fixed effects models, but have not been able to find a package with similar functionality for models with mul

[R] Replicating Stata's xtreg clustered SEs in R

2012-03-12 Thread David A. Kim
I'm trying to replicate a time-series cross-sectional analysis (countries over years) with SEs clustered by country.  The original analysis was done in Stata 10 with: xtreg [DV] [IVs] fe cluster(country). Using plm() in R (cran.r-project.org/web/packages/plm/index.html), I've replicated the coeffi