R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(155,0,28,53,30,10,27,38,0,0,152,45,25,38,26,10,24,28,0,0,11,0,4,57,9,0,14,34,29,0,239,25,13,24,17,14,12,148,30,8,64,0,33,28,0,6,25,2,24,14,3,9,53,24,144,13,21,29,13,56,11,1,35,8,37,1,40,17,36,12,15,13,16,49,32,14,3,22,2,39,9,0,79,12,1,4,16,180,0,0,2,19,9,34,0,38,36,0,45,2,11,14,38,0,16,1,13,14,170,3,36,14,9,43,6,36,3,2,29,106,0,6,45,38,18,0,0,0,0) > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(MASS) > (f<-fitdistr(x, 'negative binomial')) size mu 0.5244903 27.1162791 ( 0.0649033) ( 3.3283305) > xlab <- paste('NegativeBinomial(size=',round(f$estimate[[1]],2)) > xlab <- paste(xlab,', mu=') > xlab <- paste(xlab,round(f$estimate[[2]],2)) > xlab <- paste(xlab,')') > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Parameter',1,TRUE) > a<-table.element(a,'Estimated Value',1,TRUE) > a<-table.element(a,'Standard Deviation',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'size',header=TRUE) > a<-table.element(a,f$estimate[1]) > a<-table.element(a,f$sd[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'mu',header=TRUE) > a<-table.element(a,f$estimate[2]) > a<-table.element(a,f$sd[2]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1ht5a1352866888.tab") > > > > proc.time() user system elapsed 0.299 0.069 0.348