Dear all,

I have several response variables estimated from some simulations,
and I would like to identify the thresholds for trend changes.
Fro example, below I forced two different response behaviours
and on x is time unit.

x<-1:1500
y<-x/exp(x^0.2)
smaller15<-y[y<15]
y<-ifelse(y<15,y+rnorm(length(smaller15)), 15+rnorm(1000-length(smaller15),
0, 0.9))
myDF1<-data.frame(cbind(x,y))
plot(y~x, data=myDF1)
k1<-1:10
l1<- -65*k1*k1+750*k1-500
k2<-12:25
l2<-2.6299*k2*k2- 104.39*k2 + 1000
myDF2<-data.frame(cbind(k=c(k1,k2),l=c(l1,l2)))
plot(l~k, data=myDF2)
As one can see, the first simulation we have a non-linear ascendent
y-response, and after ~500 time steps the simulation change
the behaviour to almost stable results.

By other side, on second example I get a fast increasing, subsequent
decreasing and ~11 time steps I get a different trend.

For the first case I think that segmented package could do the
job, and for second case I think that it will not work properly.
But as my simulations is for time-series, I was thinking if we
can have a ts-like way of identify trend changes on the outcome results.

Cheers

miltinho
University of Sao Paulo, br

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to