similar to: Catching NaNs from pweibull()

Displaying 20 results from an estimated 200 matches similar to: "Catching NaNs from pweibull()"

2008 Oct 07
0
Algorithm = "port" convergence codes
Hello all, I am fitting a Gamma distribution to some data I have using nls(). The function obviously runs into issues when using a 0 as a parameter value. I understand the line alg = "port" can be used to set the lower bounds to prevent this from happening. When I run the code I get the following: Algorithm "port", convergence message: relative convergence (4). I have
2002 May 12
2
Is this a bug of pweibull()? (Follow up)
Please allow me to add just a little more about this: nothing wrong with pweibull(), namely, the two cases I reported: pweibull(3:10, 2) and pweibull(3:10, 2.1), in rw1041 and earlier version. I wonder this might just due to the change from rw1041 to rw1050, however, I can't find anything relevant (seems to me) in the News or Readme. Thanks Sundar for the suggestion of using 1 -
2002 May 11
4
Is this a bug of pweibull()?
In rw1050, I found that > pweibull(3:10, 2) [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN [7] NaN NaN Warning message: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) more surprisingly, > pweibull(3:10, 2.1) [1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN [7] NaN NaN Warning message: NaNs produced in: pweibull(q,
2008 Nov 26
1
survreg and pweibull
Dear all - I have followed the thread the reply to which was lead by Thomas Lumley about using pweibull to generate fitted survival curves for survreg models. http://tolstoy.newcastle.edu.au/R/help/04/11/7766.html Using the lung data set, data(lung) lung.wbs <- survreg( Surv(time, status)~ 1, data=lung, dist='weibull') curve(pweibull(x, scale=exp(coef(lung.wbs)),
2002 Feb 28
1
pweibull.c (PR#1334)
Full_Name: M Welinder Version: 1.4 OS: (src) Submission from: (NULL) (192.5.35.38) It seems to me that pweibull can be improved in the lower_tail=TRUE and log_p=FALSE case by using expm1. Something like -expm1(-pow(x / scale, shape)), I think. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2013 Mar 03
1
distribution functions and lists
Hello everyone, I have a quick question but I am stuck with it and I do not know how to solve it. Imagine I need the distribution function of a Weibull(1,1) at t=3, then I will write pweibull(3,1,1). I want to keep the shape and scale parameters in a list (or a vector or whatever). Then I have parameters<-list(shape=1,scale=1) but when I write pweibull(3,parameters) I get the following
2003 May 04
0
R-1.7.0 build feedback: NetBSD 1.6 (PR#2837): final report
I've now done two rebuilds of R-1.7.0 on NetBSD 1.6, one with the --without-zlib configure option, and one without. Both builds use the recently-installed gcc-3.2.3 compiler. As before, the one built normally gets a segment violation, whereas the one built with the --without-zlib option works. The odd thing is that neither uses shared libraries for zlib: % ldd /usr/local/lib/R/bin/R.bin
2011 Oct 20
1
R code Error : Hybrid Censored Weibull Distribution
Dear Sir/madam, I'm getting a problem with a R-code which calculate Fisher Information Matrix for Hybrid Censored Weibull Distribution. My problem is that: when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired result but when I take weibull(scale=1,shape=0.5) { i.e shape<1} it gives error : Error in integrate(int2, lower = 0, upper = t) : the integral is probably
2010 May 26
2
Survival analysis extrapolation
Dear all, I'm trying to fit a curve to some 1 year failure-time data, so that I can extrapolate and predict failure rates up to 3 years. The data is in the general form: Treatment Time Status Treatment A 28 0 Treatment B 28 0 Treatment B 28 0 Treatment A 28
2011 Jun 23
2
Confidence interval from resampling
Dear R gurus, I have the following code, but I still not know how to estimate and extract confidence intervals (95%CI) from resampling. Thanks! ~Adriana #data penta<-c(770,729,640,486,450,410,400,340,306,283,278,260,253,242,240,229,201,198,190,186,180,170,168,151,150,148,147,125,117,110,107,104,85,83,80,74,70,66,54,46,45,43,40,38,10) x<-log(penta+1) plot(ecdf(x),
2004 Apr 22
1
slower execution in R 1.9.0
I have an R function (about 1000 lines long) that takes more than 20 times as long to run under R Windows 1.9.0 and 1.8.1 than it does under 1.7.1. Profile results indicate that the $<-.data.frame operation is the culprit, but I don't understand exactly what that is (assignment of data frame elements to another variable?), or why it's only a problem under 1.8.1 and 1.9.0. Any advice?
2008 Mar 02
1
Problem plotting curve on survival curve (something silly?)
OK this is bound to be something silly as I'm completely new to R - having started using it yesterday. However I am already warming to its lack of 'proper' GUI... I like being able to rerun a command by editing one parameter easily... try and do that in a Excel Chart Wizzard! I eventually want to use it to analyse some chemotherapy response / survival data. That data will not be
2008 Dec 11
7
unkillable imap process(es) with high CPU-usage
Hello, I am having a problem with my dovecot-daemon. It is forking one or more (I saw up to perhaps 8 of them) imap processes under my user name. These processes are consuming a lot of CPU time and are not killable: > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 8616 arno 20 0 2900 1600 1204 R 98 0.2 1196:38 imap Stopping dovecot does not quit these
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about how I can get R to use all 8 cores of a mac pro would be most useful and very appreciated... (2) spent the last few hours trying to get pnmath to compile under os- x 10.5.4... using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from CRAN, xcode 3.0... ...xcode 3.1 installed over top of above after
1999 Dec 09
1
nlm() problem or MLE problem?
I am trying to do a MLE fit of the weibull to some data, which I attach. fitweibull<-function() { rt<-scan("r/rt/data2/triam1.dat") rt<-sort(rt) plot(rt,ppoints(rt)) a<-9 b<-.27 fn<-function(p) -sum( log(dweibull(rt,p[1],p[2])) ) cat("starting -log like=",fn(c(a,b)),"\n") out<-nlm(fn,p=c(a,b), hessian=TRUE)
2010 Mar 01
1
Fitting chi-squared distribution
Dear all, I have a question regarding performing test if the data fits chi-squared distribution. For example, using ks.test() I found in the examples how to fit it to gamma or weibull x<-rnorm(100) ks.test(x, "pweibull", shape=2,scale=1) for the gamma, pgamma can be used But I cannot find the value of this second parameter for the chi-squared distribution. Maybe someone
2012 Jan 04
1
KS and AD test for Generalized PAreto and Generalized Extreme value
Dear R helpers, I need to use KS and AD test for Generalized Pareto and Generalized extreme value. E.g. if I need to use KS for Weibull, I have teh syntax ks.test(x.wei,"pweibull", shape=2,scale=1) Similarly, for AD I use ad.test(x, distr.fun, ...) My problem is fir given data, I have estimated the parameters of GPD and GEV using lmom. But I am not able to find out the distribution
2010 Sep 21
2
Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP
Hi I am trying to determine the mean of a Weibull function that has been fit to a data set, adjusted for a categorical covariate , gender (0=male,1=female). Here is my code: library(survival) survdata<-read.csv("data.csv") ##Fit Weibull model to data WeiModel<-survreg(Surv(survdata$Time,survdata$Status)~survdata$gender) summary(WeiModel) P<-pweibull(n,
2010 Jul 20
1
Servreg $loglik
Dear R-experts: I am using survreg() to estimate the parameters of a Weibull density having right-censored observations. Some observations are weighted. To do that I regress the weighed observations against a column of ones. When I enter the data as 37 weighted observations, the parameter estimates are exactly the same as when I enter the data as the corresponding 70 unweighted observations.
2001 Jul 02
1
nls newbie: help approximating Weibull distribution
Hi folks, I tried to retain the Weibull distribution using the `nls' function and proceeding along the lines of the example provided in the `SSweibull' help (at least I thought so): t <- (1:200)/100 v <- pweibull(t, shape=3, scale=1) df <- data.frame(Time=t, Value=v) Asym <- 1.0; Drop <- 1.0; lrc <- 0; pwr <- 1 df.estimate <- nls(Value ~ SSweibull(Time,