Skip to content

PerformanceAnalytics - Style Analysis

2 messages · Thomas Etheber, Eric Zivot

#
Dear list,

finally I got the chance to have a look at your code. Basically I agree, 
it implements what Eric has suggested.

I just changed to lines:

<<<
   # perform constrained regression
   lm.con = lm(y.new ~ 0 + x.new )

   # solve for b1.hat
   b1.hat = 1 - sum( coef(lm.con) )
<<<

I think it is clearer and more convenient. Indeed the coefficients are 
restricted to sum to unity now, but is there a way to test the 
restricted coefficients for significance, i.e. something like a 
t-statistic or p-values for the single coefficients and not F-Stats for 
the whole model? Can we perhaps use the t- and p-values from the lm.con 
model?

Regards,
Thomas



Am 29.06.2010 16:55, schrieb Guy Yollin:
#
Yes there is a way to compute standard errors and get t-statistics. It's
called the delta method and it would be very easy to implement in the
present context. 

-----Original Message-----
From: Thomas Etheber [mailto:etheber at gmx.de] 
Sent: Wednesday, August 04, 2010 11:58 AM
To: Guy Yollin
Cc: Eric Zivot; r-sig-finance at stat.math.ethz.ch; brian at braverock.com
Subject: Re: [R-SIG-Finance] PerformanceAnalytics - Style Analysis

Dear list,

finally I got the chance to have a look at your code. Basically I agree, 
it implements what Eric has suggested.

I just changed to lines:

<<<
   # perform constrained regression
   lm.con = lm(y.new ~ 0 + x.new )

   # solve for b1.hat
   b1.hat = 1 - sum( coef(lm.con) )
<<<

I think it is clearer and more convenient. Indeed the coefficients are 
restricted to sum to unity now, but is there a way to test the 
restricted coefficients for significance, i.e. something like a 
t-statistic or p-values for the single coefficients and not F-Stats for 
the whole model? Can we perhaps use the t- and p-values from the lm.con 
model?

Regards,
Thomas



Am 29.06.2010 16:55, schrieb Guy Yollin:
think the constrained regression looks something like this:
con.coef,fitted.values=y.hat,residuals=resid,r.squared=R2)
method="constrained", leverage=FALSE)
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Thomas Etheber
coefficients
normalizing
it
add
the
- x1)
1
=
Etheber
should go.