Displaying 20 results from an estimated 1100 matches similar to: "MASS fitdistr with plyr or data.table?"
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
2006 Aug 16
3
fitting truncated normal distribution
Hello,
I am a new user of R and found the function dtnorm() in the package msm.
My problem now is, that it is not possible for me to get the mean and sd out of a sample when I want a left-truncated normal distribution starting at "0".
fitdistr(x,dtnorm, start=list(mean=0, sd=1))
returns the error message
"Fehler in "[<-"(`*tmp*`, x >= lower & x <= upper,
2009 Aug 25
3
Covariates in NLS (Multiple nonlinear regression)
Dear R-users,
I am trying to create a model using the NLS function, such that:
Y = f(X) + q + e
Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x is polynomial for example, but is it possible to do this kind of thing when x is a function with unknown
2009 Nov 20
2
How to use results of distribution fitting for further processing?
This is probably simple, but I have a hard time finding the solution. Any help greatly appreciated.
I would like to use the results of fitdistr(z,densfun=dweibull,start=list(scale=1,shape=1)) for further processing. How do I assign the values of scale and shape to b and a without manually entering the numbers?
TIA
__________________________________________________________________
2006 Mar 14
1
Ordered logistic regression in R vs in SAS
I tried the following ordered logistic regression in R:
mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot)
But when I asked The summary of my regression I got the folloing error message:
> summary (mod1)
Re-fitting to get Hessian
Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
the initial value of 'vmin' is not
2003 Aug 06
1
probability plot correlation coefficient
As a newbie to R, I'm still rather at a loss for finding information
(the commands names can be rather arcane)so I'm just posting my question:
I would like to estimate the shape coefficient of diverse
distributions (Weibull, gamma and Tukey-Lambda specifically, but other
could be of interest)
- Does R have a PPCC utility to estimate such parameter?(maximum value
of correlation coef)
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
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)
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],
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),
2000 Jan 27
1
error in dweibull (PR#405)
Full_Name: R. Woodrow Setzer, Jr.
Version: 0.90.1
OS: linux - Redhat 6.1
Submission from: (NULL) (165.247.155.206)
dweibull(0,1,1) evaluates to 0; it should be 1.
Note that dweibull(.Machine$double.eps) evaluates to 1.
> dweibull(.01,1,1)
[1] 0.9900498
> dweibull(.00001,1,1)
[1] 0.99999
> dweibull(.Machine$double.eps,1,1)
[1] 1
> dweibull(0,1,1)
[1] 0
2005 Sep 06
2
(no subject)
my problem actually arised with fitting the data to the weibulldistribution,
where it is hard to see, if the proposed parameterestimates make sense.
data1:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491;
?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334
how am I supposed to know what starting values i have to take?
i get different
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
2011 Apr 23
0
MASS fitdistr call in plyr help!
I have a set of wind speeds read at different locations. The data is
a data frame with two columns: site and wind speed. I want to split
the data on site and call a function to find the shape and scale
parameters of a weibull distribution fit.
The end result is a plot with x-axis = shape and y-axis = scale.
Currently my code looks like:
fit_wind_speed<-function(x){
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))}
>
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks
with the following messages:
----------------------------------------------------------------------
[...snip...]
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include
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
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]]
2006 Jul 14
1
dweibull retuns NaN instead of Inf (PR#9080)
Full_Name: G?ran Brostr?m
Version: 2.3.1
OS: Linux, ubuntu
Submission from: (NULL) (85.11.40.53)
> dweibull(0, 0.5, 1)
[1] NaN
Warning message:
NaNs produced in: dweibull(x, shape, scale, log)
should give Inf (and no Warning). Compare with
> dgamma(0, 0.5, 1)
[1] Inf
This happens when 'shape' < 1.
2005 Jun 09
2
Weibull survival modeling with covariate
I was wondering if someone familiar
with survival analysis can help me with
the following.
I would like to fit a Weibull curve,
that may be dependent on a covariate,
my dataframe "labdata" that has the
fields "cov", "time", and "censor". Do
I do the following?
wieb<-survreg(Surv(labdata$time,
labadata$censor)~labdata$cov,