[R] Fwd: empirical and GPD for time series simulation

2013-05-16 Thread Al Ehan
Hi, Does anyone know how to simulate a long time series (say 1000 daily series) or generally a series, with inverse empirical distribution and generalized pareto distribution (meaning to say the time series has a marginal distribution of empirical and GPD distribution.) using the R package? Does

[R] Fwd: empirical and GPD for time series simulation

2013-05-16 Thread Al Ehan
Hi, Does anyone know how to simulate a long time series (say 1000 daily series) or generally a series, with inverse empirical distribution and generalized pareto distribution (meaning to say the time series has a marginal distribution of empirical and GPD distribution.) using the R package? Does

[R] empirical and GPD for time series simulation

2013-05-14 Thread Al Ehan
Hi, Does anyone know how to simulate a long time series (say 1000 daily series) or generally a series, with inverse empirical distribution and generalized pareto distribution (meaning to say the time series has a marginal distribution of empirical and GPD distribution.) using the R package? Does

[R] empirical and GPD time series simulation

2013-05-14 Thread Al Ehan
Hi, Does anyone know how to simulate a long time series (say 1000 daily series) or generally a series, with inverse empirical distribution and generalized pareto distribution (meaning to say the time series has a marginal distribution of empirical and GPD distribution.)? Does anybody know if ther

[R] merging a dataframe or vectors

2013-03-13 Thread Al Ehan
Hi, I would like to know what is the easiest way to compile two or more set of vectors or data frame, according to their index. They are interrelated to one another by their assigned index. for example: #data set 1 abc #output: X403 X408 X410 X415 X418 X419 X420 X423 X424 X425

Re: [R] convert list without same component length to matrix

2012-11-01 Thread Al Ehan
Thanks a lot! best On Thu, Nov 1, 2012 at 8:19 AM, D. Rizopoulos wrote: > try this: > > l <- list(c(1,2,3,7), c(3,4,5,6,3), c(4,2,5,7), c(2,4,6,3,2), c(3,5,7,2)) > > sapply(l, head, 4) > > > I hope it helps. > > Best, > Dimitris > > > On 11/1/2012 9

[R] convert list without same component length to matrix

2012-11-01 Thread Al Ehan
Hi, I have this lame question. I want to convert a list (each with varies in length) to matrix with same row length by eliminating vectors outside the needed range. For example: l<-list(NULL) l[[1]]=1,2,3.7 l[[2]]=3,4,5,6,3 l[[3]]=4,2,5,7 l[[4]]=2,4,6,3,2 l[[5]]=3,5,7,2 #so say I want to only h

[R] vector indexing

2012-10-23 Thread Al Ehan
Hi, I got a small problem on how to define the vector index without manually inspect the vector. example: y=c(2,3,5,2,4,6,8,3,6,2,5) #I have ten set of this kind of vectors (with different values but same length) that I would also like to run the routine below #say; v=the first index in y where

[R] how to pass a function to a function inside a function

2012-09-25 Thread Al Ehan
Hi, I'm trying to compile two functions into one function. the first funtion is called 'fs' which is self-made function, another function is from the built-in 'integration' function that is copy-paste-edited. If built separatey, these functions work well. However that is not the case if combines t

Re: [R] GEV distribution fitted by L-moment graph

2012-08-15 Thread Al Ehan
Many Thanks :) On Wed, Aug 8, 2012 at 2:43 PM, J. R. M. Hosking wrote: > On 2012-08-08 04:22, Al Ehan wrote: > >> Hi, >> >> I have been having difficulties in finding packages/ codes that simplify >> plotting of a GEV fitted to dataset (by L-moments) that would

[R] GEV distribution fitted by L-moment graph

2012-08-08 Thread Al Ehan
Hi, I have been having difficulties in finding packages/ codes that simplify plotting of a GEV fitted to dataset (by L-moments) that would print out graph comprising dataset versus gumbel reduced variate n return period at the same. Anyone can help me on this? Thanks. [[alternative HTML v

[R] integral with error:non-finite function value

2012-07-03 Thread Al Ehan
Hi guys, I'm trying to use the the integral function to estimate the area under a PDF and a crossing curve. first I stated the function with several vectors in it: fn=function(a,b,F,mu,alpha,xi) { x<-vector() fs<-function(x) { c <- (mu+(alpha*(1-(1-F)^xi)/xi)) tmp <- (1 + (xi * (x - mu))/alpha)

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
> > I hope it helps. > > Best, > Dimitris > > > > On 6/27/2012 1:31 PM, Al Ehan wrote: > >> Hi R-users, >> >> I'm trying to repeat the same procedure to 1000 data set. I know this is >> very easy, but I got stuck finding the right and fastes

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
se, you could use something like > the following: > > estIID50 <- lapply(IID50, function (m) pargev(lmom.ub(m))) > > I hope it helps. > > Best, > Dimitris > > > > On 6/27/2012 1:31 PM, Al Ehan wrote: > >> Hi R-users, >> >> I'm trying to

[R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
Hi R-users, I'm trying to repeat the same procedure to 1000 data set. I know this is very easy, but I got stuck finding the right and fastest way in running it. IID50=Riidf[1:50,1:1000] #where IID50 is a dataframe consist of 1000 time series(as column) and 50 time scales (row). #what I tried to

Re: [R] lmomco in gev estimation

2012-06-20 Thread Al Ehan
I'm so very happy to receive your email. I've been stuck so long trying to figure out just why! silly me. Thanks a bunch! On Wed, Jun 20, 2012 at 11:50 AM, Peter Ehlers wrote: > On 2012-06-19 23:33, Al Ehan wrote: > >> Hi guys, >> >> I'm trying to use

Re: [R] Replication of linear model/autoregressive model

2012-06-20 Thread Al Ehan
Thanks! On Sun, Jun 17, 2012 at 1:18 AM, Miguel Manese wrote: > Hi Al, Michael, > > On Sat, Jun 16, 2012 at 11:01 AM, R. Michael Weylandt > wrote: > > On Fri, Jun 15, 2012 at 6:56 AM, Al Ehan wrote: > >> Hi, > >> > >> I would like to make

[R] lmomco in gev estimation

2012-06-20 Thread Al Ehan
Hi guys, I'm trying to use lmomco package. first I did the manual calculation on what is the estimates scale and location parameter given L-CV=0.2, L1=1000 L-moments and k (shape parameter) =- 0.1. so what i get is: location: 821.0445 scale:260.7590 shape:-0.1000 #I assign this as GEV ve

[R] Replication of linear model/autoregressive model

2012-06-15 Thread Al Ehan
Hi, I would like to make a replication of 10 of a linear, first order Autoregressive function, with respect to the replication of its innovation, e. for example: #where e is a random variables of innovation (from GEV distribution-that explains the rgev) #by using the arima.sim model from TSA pack