search for: ehan

Displaying 9 results from an estimated 9 matches for "ehan".

Did you mean: chan
2012 Nov 01
3
convert list without same component length to matrix
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 have 4 rows and 5 column in my matrix (or data.frame) and eliminating the 5th index value in l[[2]]
2012 Jun 20
2
lmomco in gev estimation
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 vectors using vec2par GEVpara2<-vec2par(c( 821.0445 , 260.7590 ,-0.1),'gev') #then I
2012 Oct 23
2
vector indexing
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 the value is larger than 4, in this case index 3, value 5 #what I would like to do is take y[1:v]
2012 Jun 27
2
how to apply the same function to multiple data set
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 do: estIID50=rep(NA,1000) for (i in 1:1000) estIID50[i]=pargev(lmom.ub(IID50[1:50,i])) #warning
2012 Jul 03
1
integral with error:non-finite function value
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) ((as.numeric(tmp > 0) * (tmp^(-1/xi - 1) *
2012 Aug 08
1
GEV distribution fitted by L-moment graph
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 version deleted]]
2013 Mar 13
1
merging a dataframe or vectors
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 X426 X427 549.58 541.91 544.18 549.37 555.54 540.83 543.26 544.26 546.85 548.98 553.10 556.49
2012 Sep 25
1
how to pass a function to a function inside a function
...built-in 'integration' function that is copy-paste-edited. If built separatey, these functions work well. However that is not the case if combines together, where certainly I made mistake somewhere when constructing the code. can someone help point out the mistakes for me please? Thanks! Aehan ____________________ intgfun<- function(a,b,c,mu,alpha,xi,upper, ...,subdivisions = 100, rel.tol = .Machine$double.eps^0.25, abs.tol = rel.tol, stop.on.error = TRUE, keep.xy = FALSE, aux = NULL) { x<-vector() fs<-function(x){ temp<-(-xi^(-1))*log(1-xi*(x-mu)/alpha) (((alpha^...
2012 Jun 15
1
Replication of linear model/autoregressive model
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 package, I try to produce Y replicates, with respect to every replicates of e, #means for e[,1], I want