Displaying 2 results from an estimated 2 matches for "rmkt".
Did you mean:
mkt
2012 Apr 05
1
how to do piecewise linear regression in R?
Dear all,
I want to do piecewise CAPM linear regression in R:
RRiskArb−Rf = (1−δ)[αMktLow+βMktLow(RMkt−Rf)] + δ[αMkt High +βMkt High(RMkt −Rf )]
where δ is a dummy variable if the excess return on the value-weighted CRSP index is above a threshold level and zero otherwise. and at the same time add the restriction:
αMkt Low + βMkt Low · Threshold = αMkt High + βMkt High · Threshold
to ensure cont...
2012 Mar 25
2
avoiding for loops
I have data that looks like this:
> df1
group id
1 red A
2 red B
3 red C
4 blue D
5 blue E
6 blue F
I want a list of the groups containing vectors with the ids. I am
avoiding subset(), as it is
only recommended for interactive use. Here's what I have so far:
df1 <- data.frame(group=c("red", "red", "red", "blue",