Dear R-helpers, I have been trying to carry out some variance ratio tests such as Lo-MacKinlay test and Chow-Denning test. However, When I write the function LM <- Lo.Mac(y,kvec) or any other functions I don’t get the results displayed. The only sign I get is < I don’t understand what’s wrong (is it the package, misspecification of the function, Vista). I am really stuck in and I would be grateful for any hints that may help me get the results displayed. Many thanks in advance, Ben. [[alternative HTML version deleted]]
Hichem Ben Khedhiri wrote:> > I have been trying to carry out some variance ratio tests such as > Lo-MacKinlay test and Chow-Denning test. However, When I write the > function LM <- Lo.Mac(y,kvec) > or any other functions I don?t get the results displayed. The only > sign I get is < >It is important that you say that you are are using package vrtest, and how your calls look in detail. Does the example below work? data(exrates) y <- exrates$ca # read Canadian exchange rate nob <- length(y) r <- log(y[2:nob])-log(y[1:(nob-1)]) # log return calculation kvec <- c(2,5,10) Lo.Mac(r,kvec) # will display (or better "print") f = Lo.Mac(r,kvec) # this will not display anything, which is mostly the case for similar function f # this will display something print(f) # same result Dieter -- View this message in context: http://n4.nabble.com/Display-of-results-tp1288721p1288732.html Sent from the R help mailing list archive at Nabble.com.
Hichem Ben Khedhiri wrote:> Dear R-helpers, > > I have been trying to carry out some variance ratio tests such as > Lo-MacKinlay test and Chow-Denning test. However, When I write the > function LM <- Lo.Mac(y,kvec) > or any other functions I don?t get the results displayed. The only > sign I get is < > > I don?t understand what?s wrong (is it the package, misspecification > of the function, Vista). I am really stuck in and I would be grateful > for any hints that > may help me get the results displayed. > >What happens when you type LM or print(LM)? Might be time to read the Intro to R. -Peter Ehlers> Many thanks in advance, > > Ben. > > [[alternative HTML version deleted]] > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
I don't know this test, but as written, LM <- Lo.Mac(y,kvec), will just make an assignment. To display the result you could write: (LM <- Lo.Mac(y,kvec)) ----- Original Message ----- From: "Hichem Ben Khedhiri" <bk.hichem at googlemail.com> To: <r-help at r-project.org> Sent: Sunday, January 24, 2010 9:47 AM Subject: [R] Display of results Dear R-helpers, I have been trying to carry out some variance ratio tests such as Lo-MacKinlay test and Chow-Denning test. However, When I write the function LM <- Lo.Mac(y,kvec) or any other functions I don't get the results displayed. The only sign I get is < I don't understand what's wrong (is it the package, misspecification of the function, Vista). I am really stuck in and I would be grateful for any hints that may help me get the results displayed. Many thanks in advance, Ben. [[alternative HTML version deleted]] --------------------------------------------------------------------------------> ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >