search for: lognormal

Displaying 20 results from an estimated 75 matches for "lognormal".

2003 Jul 25
5
named list 'start' in fitdistr
...lly specified: `cauchy', `gamma', `logistic', `negative binomial' (R only, parametrized by `mu' and `size'), `t', `uniform', `weibull'. " However I cannot fit an univariate distribution named 'test' I get this: >fitdistr(test,"lognormal") Error in fitdistr(test, "lognormal") : `start' must be a named list > fitdistr(test,"lognormal",start$meanlog=0,start$sdlog=1) Error: syntax error How I am supposed to type a value for start depending on the distribution on which I am fitting my set thanks *...
2008 Feb 22
1
fitting a lognormal distribution using cumulative probabilities
Dear all, I'm trying to estimate the parameters of a lognormal distribution fitted from some data. The tricky thing is that my data represent the time at which I recorded certain events. However, in many cases I don't really know when the event happened. I' only know the time at which I recorded it as already happened. Therefore I want to fit the log...
2008 Jul 17
0
How to compute loglikelihood of Lognormal distribution
Hi, I am trying to learn lognormal mixture models with EM. I was wondering how does one compute the log likelihood. The current implementation I have is as follows, which perform really bad in learning the mixture models. __BEGIN__ # compute probably density of lognormal. dens <- function(lambda, theta, k){ temp<-N...
2005 May 03
2
comparing lm(), survreg( ... , dist="gaussian") and survreg( ... , dist="lognormal")
...ment. Using predict() for the lm, and predict.survreg() for the survreg model and correcting for the differences in stdev, produces identical plots of the fit and the upper and lower confidence intervals. All of this is as it should be. And, vvvvvv lognormal.survreg<- survreg(formula=Surv(time=(Cycles), event) ~ log10(stress), dist="lognormal", data=survreg.df) produces summary() results that are identical to the earlier call to survreg(), except for the call, of course. The parameter estimates and SE are identical. Again this is as I w...
2011 Mar 15
3
fitting a distribution to a ecdf plot
Dear all, I need to plot an cumulative distribution plot of a variable and then to fit a distribution to that, probably a weibull or lognormal. I have plotted the ecdf as > plot(ecdf(x)) but I haven't managed to fit the distribution. I have as well attached the data. I would appreciate if you could help me on that. Thank you. Kind regards Maria -------------- next part -------------- An embedded and charset-unspecified text wa...
2017 Jul 10
0
fit lognorm to cdf data
* fitdistr? * it seems unusual (to me) to fit directly to the data with lognormal... fitting a normal to the log of the data seems more in keeping with the assumptions associated with that distribution. -- Sent from my phone. Please excuse my brevity. On July 10, 2017 7:27:47 AM PDT, PIKAL Petr <petr.pikal at precheza.cz> wrote: >Dear all > >I am struggling to f...
2010 Mar 26
1
Poisson Lognormal
Hi R Users, I'm going to estimate via. ML the parameters in Poisson Lognormal model. The model is: x | lambda ~ Poisson(lambda) lambda ~ Lognormal(a,b) Unfortunately, I haven't found a useful package allowing for such estimation. I tried to use "poilog" package, but there is no equations and it's hard to understand what exactly this package really does. U...
2005 Sep 09
2
test for exponential,lognormal and gammadistribution
hello! i don't want to test my sample data for normality, but exponential- lognormal- or gammadistribution. as i've learnt the anderson-darling-test in R is only for normality and i am not supposed to use the kolmogorov-smirnov test of R for parameter estimates from sample data, is that true? can you help me, how to do this anyway! thank you very much! nadja
2001 Dec 21
1
proportional hazard with parametric baseline function: can it be estimated in R
Greetings -- I would like to estimate a proportional hazard model with a weibull or lognormal baseline. I have looked at both the coxph() and survreg() functions and neither appear (to me ) to do it. Am I missing something in the docs or is there another terrific package out there that will do this. Many Thanks. Carl Mason -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2012 Oct 14
0
multivariate lognormal distribution simulation in compositions
...as follows:   sigma <-matrix(c(0.0037,-0.0001,-0.0370,-0.0136,0.0026,-0.0001,0.0001,0.0008,-0.0015,-0.0011,-0.0370,0.0008,1.0466,0.7208,-0.0455,-0.0136,-0.0015,0.7208,1.1717,0.0346,0.0026,-0.0011,-0.0455,0.0346,0.0348),byrow=TRUE,ncol=5) mu <-c(0.094,0.006,1.337,1.046,0.263)   sampling form a lognormal distribution would be reasonable in this case as far as I can tell so with the help of Berend, the cov matrix was converted to log-return from an arithmetic return as follows:   logreturn <- function(am,asigma) {   M <- 1/(1+am)   S <- log( diag(M) %*% asigma %*% diag(M) + 1)   mu <...
2006 Nov 18
3
Random sample from log-normal distribution
Dear all R users, Please forgive me if my question is too trivial. Suppose I have two variables, (x,y) which is log-normally distributed with expected value (mu1, mu2) and some variance-covariance matrix. Now I want to draw a random sample of size 1000 from this distribution. Is there any function available to do this? Thanks and regards, Megh
2017 Jul 10
4
fit lognorm to cdf data
Dear all I am struggling to fit data which form something like CDF by lognorm. Here are my data: proc <- c(0.9, 0.84, 0.5, 0.16, 0.1) size <- c(0.144, 0.172, 0.272, 0.481, 0.583) plot(size, proc, xlim=c(0,1), ylim=c(0,1)) fit<-nls(proc~SSfpl(size, 1, 0, xmid, scal), start=list(xmid=0.2, scal=.1)) lines(seq(0,1,.01), predict(fit, newdata=data.frame(sito=seq(0,1,.01))), col=2) I tried
2006 Aug 18
0
Fitting Truncated Lognormal to a truncated data set (was: fitting truncated normal distribution)
Dear List, I am trying to fit Truncated Lognormal to a data set that is 'truncated' from above a certain value, say, 0.01. Below is what I was able to come up with. I would appreciate it if you could review and make any necessary changes. # This is modified off the code for 'dtnorm' of library(msm). dtlnorm <- function (n, me...
2014 May 15
0
lognormal frailty in frailtypack
Hi everyone I am attempting to estimate a model with a frailty effect distributed as a lognormal variable.I am using the following code: frailtyPenal(formula, data, ..., RandDist = "LogN") I get the following error message: Error in frailtyPenal(Surv(,) ~ + , : unused argument(s) (RandDist = "") What can I do? Thanks for the help [[alternative HTML version deleted...
2008 Feb 18
0
Solved (??) Behaviour of integrate (was 'Poisson-lognormal probab ility calculations')
...hine$double.eps^0.5,...) { #+ # K. Jewell Feb 2008 # Based on VGAM::dpolono, modified to cover wider range of x # Some simplification, but major change is to avoid integration problems by # limiting range of integration to sdlim (default = 6) standard deviations each side # of mean of Poisson or lognormal. Also increase default precision of integration. # For x in 0:170 (working range of VGAM::dpolono) and default parameters, max deviation # from VGAM::dpolono is 3.243314e-05 of VGAM::dpolono result #- require(stats) mapply(function(x, meanlog, sdlog, ...){ lower <- min(max(0,...
2017 Jul 10
0
fit lognorm to cdf data
How about proc <- c(0.9, 0.84, 0.5, 0.16, 0.1) size <- c(0.144, 0.172, 0.272, 0.481, 0.583) plot(size, proc, xlim=c(0,1), ylim=c(0,1)) fit<-nls(proc~plnorm(size, log(xmid), sdlog, lower=FALSE), start=list(xmid=0.2, sdlog=.1)) summary(fit) lines(fitted(fit)~size) -pd > On 10 Jul 2017, at 16:27 , PIKAL Petr <petr.pikal at precheza.cz> wrote: > > Dear all > > I am
2008 Feb 15
0
Behaviour of integrate (was 'Poisson-lognormal probability calcul ations')
...to the note in ?integrate "If the function is approximately constant (in particular, zero) over nearly all its range it is possible that the result and error estimate may be seriously wrong.". I wouldn't really expect multiplication by a large constant to fix such errors (??), but the lognormal distribution is skew so it might be considered "approximately constant ... over nearly all its range". Even though ... > integrate(dlnorm, 0, Inf) 1 with absolute error < 2.5e-07 ... suggests that this is not the source of the problem, I tried changing variables to integrate over...
2004 Oct 17
2
Errors while compiling packages with namespace?
Hello, I try to set up namespaces for packages. It is fine for several of them, except one whose compilation fails (under Windows XP & R 2.0.0): ---------- Making package svViews ------------ adding build stamp to DESCRIPTION installing NAMESPACE file and metadata Error in parse(file, n, text, prompt) : syntax error on line 21 Execution halted make[2]: *** [nmspace] Error 1 make[1]: ***
2017 Jul 11
1
fit lognorm to cdf data
Hi Great. I did not think that such combination is posssible. Thanks. Petr > -----Original Message----- > From: peter dalgaard [mailto:pdalgd at gmail.com] > Sent: Tuesday, July 11, 2017 1:11 AM > To: PIKAL Petr <petr.pikal at precheza.cz> > Cc: r-help at r-project.org > Subject: Re: [R] fit lognorm to cdf data > > How about > > proc <- c(0.9, 0.84, 0.5,
2012 Aug 31
3
fitting lognormal censored data
Hi , I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators...