On Jan 23, 2013, at 12:14 PM, Katherine Gobin wrote:
Dear R helpers,
I have following loss data and I need to fit LEFT truncated Log Normal
distribution to this data which is Truncated at 100.
dat =
c(1333834,5710254,9987567,7809469,6940935,3473671,1270209,1102523,1124002,
5830159,4302300,3925242,2638409,2324421,7238436,9088709,7439250,4976551,4864319,
8741334,1863770,7098310,4942288,4971829,4986372)
library(gamlss.tr)
gen.trun(5, LOGNO)
result - gamlss(dat~1, family=LOGNOtr)
# THIS GIVES
result
Family: c(LOGNOtr, left truncated Log Normal)
Fitting method: RS()
Call: gamlss(formula = dat ~ 1, family = LOGNOtr)
Mu Coefficients:
(Intercept)
15.23
Sigma Coefficients:
(Intercept)
-0.3977
Degrees of Freedom for the fit: 2 Residual Deg. of Freedom 23
Global Deviance: 812.568
AIC: 816.568
SBC: 819.006
My problem is how do I extract these values of Mu Coefficients and Sigma
Coefficients, if I want to use these values for further analyses?
After looking at names(result)
result$mu.coefficients
(Intercept)
15.23012
result$sigma.coefficients
(Intercept)
-0.3976947
help(gamlss.tr)
I looked for an extractor function in hte Index for htat package but didn't
find one. Since this is a suite of packages you should probably do your own
more extensive search in the documents.
--
David
David Winsemius
Alameda, CA, USA
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.