Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fit = fitdistr(Y, "weibull")
- Warning message:
- In densfun(x, parm[1], parm[2], ...) : NaNs produced
- > warnings(fit)
- Warning message:
- In densfun(x, parm[1], parm[2], ...) : NaNs produced Error in
- at(list(...), file, sep, fill, labels, append) :
- argument 2 (type 'list') cannot be handled by 'cat'
- shape scale
- 2.1103684 1537.2344072
- (0.2245888) (112.1596367)
- Weibull Scale 1550.559
- Weibull Shape 2.1195
- > library(Renext) ## for concentrated log-lik
- > try(fweibull(Y)) ## error (numerical pb with information matrix)
- > fit <- fweibull(Y / 1000) ## works
- > ## set parameters and logLik back to original scale
- > fit$est * c(1, 1000)
- shape scale
- 2.126225 1563.094460
- > fit$sd * c(1, 1000)
- shape scale
- 0.2444308 114.1293266
- > fit$loglik - length(Y) * log(1000)
- [1] -362.2237
- > library(MASS)
- > ## set parameters and logLik back to original scale
- > fit2 <- fitdistr(Y / 1000, "weibull")
- > fit2$est * c(1, 1000)
- shape scale
- 2.126231 1563.095165
- > fit2$sd * c(1, 1000)
- shape scale
- 0.2288605 114.9071653
- > fit2$loglik - length(Y) * log(1000)
- [1] -362.2237
- > survreg(Surv(Y)~1)
- Call:
- survreg(formula = Surv(Y) ~ 1)
- Coefficients:
- (Intercept)
- 7.354423
- Scale= 0.4703164
- Loglik(model)= -362.2 Loglik(intercept only)= -362.2
- n= 46
- > exp(7.354423) # exponentiate the Intercept
- [1] 1563.095
- > 1/0.4703164 # take inverse of the Scale
- [1] 2.126228
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement