[R] Skew Normal CDF using psn (package sn)

2012-09-03 Thread Boris Beranger
Dear R-users, I have been using the code below in order to verify how the CDF of a skew-normal distribution was calculated: library(sn) s=seq(-30,30,by=0.1) a<-matrix(nrow=length(s),ncol=5) lambda=1 for(i in 1:length(s)){ a[i,1]=pnorm(s[i],mean=0,sd=1); a[i,2]=T.Owen(s[i],lambda); a

[R] Skew-Normal CDF using psn

2012-09-02 Thread Boris Beranger
Dear R-users, I have been using the code below in order to verify how the CDF of a skew-normal distribution was calculated: library(sn) s=seq(-30,30,by=0.1) a<-matrix(nrow=length(s),ncol=5) lambda=1 for(i in 1:length(s)){ a[i,1]=pnorm(s[i],mean=0,sd=1); a[i,2]=T.Owen(s[i],lambda); a

Re: [R] Converiting longitude/latitude to utm

2012-06-05 Thread Boris Beranger
niversity > College Station, TX 77843-4352 > > > > > -----Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > > project.org] On Behalf Of Boris Beranger > > Sent: Tuesday, June 05, 2012 3:29 AM > > To: R-help@r-project.org &

[R] Converiting longitude/latitude to utm

2012-06-05 Thread Boris Beranger
Dear all, I have been trying to convert coordinates from longitude/latitude to utm but I got an error. As soon as the longitude coordinate is greater than 90, I get the folloowing error message: "error in pj_transform: latitude or longitude exceeded limits" Here is what I did: SP<-SpatialPoint

Re: [R] generate randomly a value of a vector

2011-09-08 Thread Boris Beranger
Thank you very much Andrija, I have been do some research and was about to post the same solution. Boris -- View this message in context: http://r.789695.n4.nabble.com/generate-randomly-a-value-of-a-vector-tp3798190p3798595.html Sent from the R help mailing list archive at Nabble.com.

[R] generate randomly a value of a vector

2011-09-08 Thread Boris Beranger
Hi everyone, I have a zero vector of length N and I would like to randomly allocate the value 1 to one of the values of this vector. I presume I have to use the uniform distribution but could someone tell me how I should process? Thanks in advance, Boris -- View this message in context: http://

Re: [R] Weights using Survreg

2011-09-06 Thread Boris Beranger
Sorry when we talk about about MLE estimates does that mean WLE?I am trying to understand if the survreg function is allowing a weight for each density function when calculating the likelihood. In my second question I was trying to explain that my problem is that I have pipes of different length a

Re: [R] Weights using Survreg

2011-09-02 Thread Boris Beranger
Thank you for your reply, it has been helpful. Do you know if the parameters estimators are MLE estimators? One more question: In my case study I have failures that occured on different objects that have different age and length, could I use weight to find the estimates of a weibull law and so to

[R] Weights using Survreg

2011-08-31 Thread Boris Beranger
Dear R users, I have been trying to understand what the Weights arguments is doing in the estimation of the parameters when using the Surreg function. I looked through the function's code but I am not sure if I got it or not. For example, if I inclue the Surv function in it: survreg(Surv(vector,