Hello, I would like to run several regressions by stock ticker using panel
data.  Here is some code that describes what I would like to do.  Does
anyone have any suggestions?  Thank you!!  Geoff

TICKER <- c(rep('IBM',5), rep('GOOG',5), rep('VZ',5));
YEAR <- c(seq(2000,2004), seq(2000,2004), seq(2000,2004));
RET <- c(15,10,2,8,9,12,6,7,12,2,3,1,18,15,4);
MARKET <- c(12,4,12,14,10,9,8,2,4,1,12,18,12,14,15);

reg.data <- data.frame(TICKER, YEAR, RET, MARKET);
reg.data;

#I would like to regress the variable RET on MARKET by TICKER.
#I would like to end up with a data frame containing TICKER and the
coefficient on MARKET (i.e., beta).
#For example, something like this:

data.frame(TICKER=c('IBM','GOOG','VZ'), BETA=c(1.20, 0.80, 1.05));

	[[alternative HTML version deleted]]

