Displaying 4 results from an estimated 4 matches for "oliverfaulhaber".
2007 Feb 02
1
Newbie problem: Vectorizing a minimum function with constraints
...5 2000-01-03
4 20 2000-01-04
The output should be
Index z
1 2
2 N.A.
3 4
4 N.A.
I don't have any idea how to program this in an elegant way in R. Any
help is thus highly appreciated.
Thanks in advance
Oliver
--
Oliver Faulhaber (Dipl.-Math. oec., Aktuar DAV)
oliverfaulhaber at gmx.de ? www.oliverfaulhaber.de
2007 Apr 22
1
How to add e.g. lines to a zoo plot?
...add a straight line like
lines(x,c(2,2,2),col="blue")
to the first panel. How can I achieve this? Performing the "lines" does
indeed create a line, but puts it in the middle of nowhere.
Thanks in advance
Oliver
--
Oliver Faulhaber ? Heckerstr. 2a ? D-68723 Schwetzingen
oliverfaulhaber at gmx.de ? http://www.oliver-faulhaber.de
2007 Mar 12
1
How to avoid a for-loop?
Hi all,
as I am trying to move slowly from just "working" to "good" code, I'd
like to ask if there's a smarter way than using a for-loop in tasks like
the example below.
I need to obtain the extrema of the cumulated sum of a detrended time
series. The following code is currently used, please have a look at the
comments for my questions and remarks:
system.time({
X
2007 Mar 26
3
Is the random number generator biased?
Hi all,
in order to verify some results I did the following test in R (2.4.1.,
windows system):
X <- cumsum(rnorm(1000000))
for (i in 1:1000) {
tmp <- seq(1,length(X),by=i)
X.coarse <- X[tmp]
X.return <- diff(X.coarse)
X.scale.mean[i] <- mean(X.return)
}
plot(X.scale.mean,type="l")
As X is a random walk with