Displaying 1 result from an estimated 1 matches for "trsvr".
Did you mean:
rsvr
2001 Mar 03
1
vector argument to rnorm
...f you pass in a single element vector the first element of that is
taken as the desired n (OK) , but otherwise the length of the vector
argument is taken as the desired n.
I came across this usage in an example for terasvirta.test (same for
white.test) in tseries
> example(terasvirta.test)
trsvr.> n <- 1000
trsvr.> x <- runif(1000, -1, 1)
trsvr.> y <- x^2 - x^3 + 0.1 * rnorm(x)
trsvr.> terasvirta.test(x, y)
and it seemed to me that rnorm(n) was what was intended, not that it would
make any difference in practice in this case.
Is this a standard practice? .. that in...