Skip to content

Display of results

4 messages · Hichem Ben Khedhiri, Dieter Menne, Peter Ehlers +1 more

#
Hichem Ben Khedhiri wrote:
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
#
Hichem Ben Khedhiri wrote:
What happens when you type LM or print(LM)?
Might be time to read the Intro to R.

  -Peter Ehlers
#
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.





--------------------------------------------------------------------------------