I'm trying to drop all rows except for the ones with the most recent year.
So I split the data frame by NPERMNO and keep just the last record of all
groups.
datg=t(sapply(split(datgic, datgic$NPERMNO, drop=TRUE), function(x){return(
x[nrow(x),] )}))
I get something like this...
GVKEY
An undergraduate here, so do not hesitate to let me know if you feel that
I'm heading in a wrong direction.
I have a data frame containing panel data across 10 years (hence 120
months). I want to be able to run regression separately for each month (or
year). The below shows how I ran the
, mydf$TIME), function(x){coefficients(summary(glm(X ~ A +
B, data = x, family=binomial)))})
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike H. Ryu
Sent: Tuesday, April 29, 2008 7:27 AM
To: r-help@r-project.org
Subject: [R] Running regression (lm, lrm
3 matches
Mail list logo