Re: [R] about R squared value

2007-04-23 Thread Bernd Dittmann
Hi Nitish, R^2 cannot take values of greater than 1. Per definition (see http://en.wikipedia.org/wiki/Coefficient_of_determination) R^2 := 1- SSE/SST whereby SSE = sum of squared errors SST = total sum of squares For R^2 > 1 would require SSE/SST <0. Since SSE and SST are non-negative (check

Re: [R] p-values and significance

2007-04-11 Thread Bernd Dittmann
Hi Paul, here's a lm model to illustrate this: > summary(lm(y~x.1+x.2)) Call: lm(formula = y ~ x.1 + x.2) Residuals: Min 1Q Median 3QMax -0.0561359 -0.0054020 0.0004553 0.0056516 0.0515817 Coefficients: Estimate Std. Error t value Pr(>|t|)

[R] - Nonparametric variance test

2007-03-04 Thread Bernd Dittmann
Hi useRs, can a variance test for 2 non-normal samples be tested in R? Also, thus far I have not been able to find the Friedman two way analysis of variance. For normal r.v., the var.test is available, but are there any tests available for non-normal samples? Thanks! Bernd __

[R] garch and extra explanatory variable

2007-02-27 Thread Bernd Dittmann
Hi useRs, a daily garch(1,1) model can be extended whereby the variance equation incorporates say higher frequency volatility measure. The variance equation would look something like: s(t)2 = garch(1,1) + a*v(t-1) whereby v(t-1) would be the intraday vola of yesterday ("a" the coef.). How can

Re: [R] Calculating the Sharpe ratio

2007-02-20 Thread Bernd Dittmann
plusreturns) > > cumrtns<-cumprodrtns-1. > > Then, the elements in cumrtns represent the cumulative reeturn upto that > point. > > But, test it out with an easy example to make sure because I didn't. > > > > > -Original Message- > From: [EMAIL PRO

[R] Calculating the Sharpe ratio

2007-02-19 Thread Bernd Dittmann
Hi useRs, I am trying to calculate the Sharpe ratio with "sharpe" of the library "tseries". The documentation requires the univariate time series to be a portfolio's cumulated returns. In this case, the example given data(EuStockMarkets) dax <- log(EuStockMarkets[,"FTSE"]) is however not the

[R] manual construction of box&whisker plot

2006-04-15 Thread Bernd Dittmann
mp;w plot for each group. How could I possibly do that? Also, what would be the most convenient approach. Looking forward to your suggestions. Many thanks in advance! Sincerely, Bernd Dittmann __ R-help@stat.math.ethz.ch mailing list https://stat.et

[R] question reg. conditional regression

2006-04-13 Thread Bernd Dittmann
e result correctly. Is it indeed implied that, if the condition of dx[1:2746] > 15 is fulfilled, then dx[2:2747] changes by 3.49333 the next period? Alternatively, if this period's charge is =< 15, then there is no significant change (-0.04129, t=-0.360) the next period.

Re: [R] How to implement an iterative unit root test

2006-04-08 Thread Bernd Dittmann
0.5612 Description: Sat Apr 08 19:11:40 2006 I checked with the help pages of the adfTest and fMultivar, but can simply not figure out why I am receiving these error messages above. How could I fix this? Many thanks! Sincerely, Bernd Dittmann Gabor Grothendieck schrieb: > Try this: > >

Re: [R] How to implement an iterative unit root test

2006-04-08 Thread Bernd Dittmann
0,nrow=100) > bar <- apply(foo,2,adf.test) > sapply(bar, "[[", "statistic") > sapply(bar, "[[", "p.value") > > > HTH, Andy > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Bernd

[R] How to implement an iterative unit root test

2006-04-05 Thread Bernd Dittmann
each day's calculations. How can such a test be done in R? More specifically, how can it be programmed to iteratively perform the test and also how to extract the t-values on a daily basis? Thank you. Sincerely, Bernd Dittmann __ R