Hello I need to know how to apply a for loop regression over separate dataframes. I started by making a list of dataframes
dflist = c(cvx,csco,trv,unh,gs,nke,v,aapl,wba)
The response variable is ri_rf and the explanatory variables are smb,hml,capm.
I've already calculated smb, hml, capm, ri_rf and have them laid out from stock 1 to stock 12. I just need to regress for each stock!
I need the equation
lm(ri_rf ~ smb, hml,capm)
Can someone please help me out!!! Thanks