Displaying 20 results from an estimated 2000 matches similar to: "Weibull Likelihod function."
2012 Feb 21
3
HELP ERROR Weibull values must be > 0
GUYS,
I NEED HELP WITH ERROR:
library(MASS)
> dados<-read.table("mediaRGinverno.txt",header=FALSE)
> vento50<-fitdistr(dados[[1]],densfun="weibull")
Erro em fitdistr(dados[[1]], densfun = "weibull") :
Weibull values must be > 0
WHY RETURN THIS ERROR? WHAT CAN I DO?
BEST REGARDS
[[alternative HTML version deleted]]
2009 Apr 30
1
finite mixture model (2-component Weibull): plotting Weibull components?
Dear Knowledgeable R Community Members,
Please excuse my ignorance, I apologize in advance if this is an easy question, but I am a bit stumped and could use a little guidance.
I have a finite mixture modeling problem -- for example, a 2-component Weibull mixture -- where the components have a large overlap, and
I am trying to adapt the "mclust" package which concern to normal
2001 Aug 28
2
Estimating Weibull Distribution Parameters - very basic question
Hello,
is there a quick way of estimating Weibull parameters for some data points
that are assumed to be Weibull-distributed?
I guess I'm just too lazy to set up a Maximum-Likelihood estimation...
...but maybe there is a simpler way?
Thanks for any hint (and yes, I've read help(Weibull) ;)
Kaspar Pflugshaupt
--
Kaspar Pflugshaupt
Geobotanical Institute
ETH Zurich, Switzerland
2003 Oct 20
1
Fitting a Weibull/NaNs
I'm trying to fit a Weibull distribution to some data via maximum
likelihood estimation. I'm following the procedure described by Doug
Bates in his "Using Open Source Software to Teach Mathematical
Statistics" but I keep getting warnings about NaNs being converted to
maximum positive value:
> llfunc <- function (x) { -sum(dweibull(AM,shape=x[1],scale=x[2], log=TRUE))}
>
2008 Apr 15
1
Weibull
Dear R users,
This is a basic question.
I want to fit a Weibull distribution. fitdistr(data, "weibull") works and it
is a maximum likelihood fitting. Is it a good method ? Or is it better to
write a function for the log-likelihood and the gradient and to use a
numerical routine ?
Fitdistr works for uncensored data, but what can I use for censored (and
uncensored) data ?
Thank you
2002 Jan 17
1
weibull in R
Hi all
I try to make a weibull survival analysis on R.
I know make this on GLIM, and now I try to make the GLIM exercice GLEX8 on R
to learning and compare the test.
The variables are:
time censor group bodymass
In GLIM I make:
$calc %s=1 $ to fit weibull rather than exponential
$input %pcl weibull $
$macro model group*bodymass $endmac$
$use weibull t w %s $
Then, GLIM estimate an alpha for the
2011 Oct 28
1
weibull fitdistr problem: optimization failed
I'm getting errors when running what seems to be a simple Weibull
distribution function:
This works:
x <-
c(23,19,37,38,40,36,172,48,113,90,54,104,90,54,157,51,77,78,144,34,29,45,16,15,37,218,170,44,121)
rate <- c(.01,.02,.04,.05,.1,.2,.3,.4,.5,.8,.9)
year <- c(100,50,25,20,10,5,3.3,2.5,2,1.2,1.1)
library(MASS)
x <- sort(x)
tryCatch(
f<-fitdistr(x, 'weibull'),
error
2004 Jan 14
1
estimation of lambda and gamma with std errors for a weibull model
Dear R experts,
How should lambda and gamma (with std.errors) be calculated for a weibull model with age as an independent predictor? I have assumed that this can be done with survreg with e. g. (summary(survreg(Surv(time, status) ~ age, dist = 'weibull')) ) and predict.survreg with e.g. (predict(model, se.fit = T, newdata = data.frame(age = seq(50, 80, 5)) but unfortunately I'm
2011 Apr 27
3
MASS fitdistr with plyr or data.table?
I am trying to extract the shape and scale parameters of a wind speed
distribution for different sites. I can do this in a clunky way, but
I was hoping to find a way using data.table or plyr. However, when I
try I am met with the following:
set.seed(144)
weib.dist<-rweibull(10000,shape=3,scale=8)
weib.test<-data.table(cbind(1:10,weib.dist))
2008 Oct 07
3
Fitting weibull, exponential and lognormal distributions to left-truncated data.
Dear All,
I have two questions regarding distribution fitting.
I have several datasets, all left-truncated at x=1, that I am attempting
to fit distributions to (lognormal, weibull and exponential). I had
been using fitdistr in the MASS package as follows:
fitdistr<-(x,"weibull")
However, this does not take into consideration the truncation at x=1. I
read another posting in this
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,
2012 Feb 21
5
help error: In dweibull(x, shape, scale, log) : NaNs produzidos
Guys,
I'm having an error when I use the command:
library(MASS)> dados<-read.table("inverno.txt",header=FALSE)> vento50<-fitdistr(dados[[1]],densfun="weibull")Mensagens de aviso perdidas:1: In dweibull(x, shape, scale, log) : NaNs produzidos2: In dweibull(x, shape, scale, log) : NaNs produzidos3: In dweibull(x, shape, scale, log) : NaNs produzidos4: In
2002 Apr 05
2
weighted 2 or 3 parameter weibull estimation?
I've figured out how to use optim (barely) to estimate 2 parameter =
weibull distributions. I can't get over how easy this is. What I need to =
do is use a weight in the observations.....
For example,=20
the tree diameters and weights are are=20
4.70 , 100
6.00, 98
7.10, 75.0
8.10, 86.3
8.60, 80.456
8.90, 20.5
9.50, 16.6
11.40, 12.657
11.80, 12.47
14.50,
2012 Jan 29
1
r-help; weibull parameter estimate
Hello,
If i write a function as below using log of weibull distribution i do not get the required
results in estimating the parameters what do i do, please
a/b * (t/b)^a-1 * exp(-t/b)^a
n=500
x<-rweibull(n,2,2)
z<-function(p) {(-n*log(p[1])+n*log(p[2])-
(p[1]-1)*sum(log(x))+(p[1]-1)*log(p[2])+(sum(x/p[2])^(p[1])) )}
zz<-optim(c(0.5,0.5),z)
zz
[[alternative HTML version deleted]]
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
2005 Jul 22
1
multiplicate 2 functions
Thks for your answer,
here is an exemple of what i do with the errors in french...
> tmp
[1] 200 150 245 125 134 345 320 450 678
> beta18
Erreur : Objet "beta18" not found //NORMAL just to show it
> eta
[1] 500
> func1<-function(beta18) dweibull(tmp[1],beta18,eta)
> func1<-func1(beta18) * function(beta18)
dweibull(tmp[2],beta18,eta)
Erreur dans dweibull(tmp[1],
2004 Nov 23
6
Weibull survival regression
Dear R users,
Please can you help me with a relatively straightforward problem that I
am struggling with? I am simply trying to plot a baseline survivor and
hazard function for a simple data set of lung cancer survival where
`futime' is follow up time in months and status is 1=dead and 0=alive.
Using the survival package:
lung.wbs <- survreg( Surv(futime, status)~ 1, data=lung,
2011 Nov 03
1
Fit continuous distribution to truncated empirical values
Hi all,
I am trying to fit a distribution to some data about survival times.
I am interested only in a specific interval, e.g., while the data lies in the interval (0,...., 600), I want the best for the interval (0,..., 24).
I have tried both fitdistr (MASS package) and fitdist (from the fitdistrplus package), but I could not get them working, e.g.
fitdistr(left, "weibull", upper=24)
2012 Feb 23
3
why is generating the same graph???
Hi,
why my script iss always generating the same graph?when I change the parameters and the name of text file?
library(MASS)
dados<-read.table("inverno.txt",header=FALSE)
vento50<-fitdistr(dados[[1]],densfun="weibull")
png(filename="invernoRG.png",width=800,height=600)
hist(dados[[1]], seq(0, 18, 0.5), prob=TRUE, xlab="Velocidade
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)