Message-ID: <CAGjPSW4hVL4iy0fzWJca9Mq5zOjtUJ-pbCx4iCQDovL=q=pJLA@mail.gmail.com>
Date: 2018-09-24T18:32:10Z
From: Paulo InĂ¡cio Prado
Subject: Trouble plotting a maximum likelihood model(s) to rank abundance curves in fitsad
In-Reply-To: <CAHXZ6+i-jUawUDsi6FQvu3GhY624euXXdSpKyV+QeJyU9vK4Sg@mail.gmail.com>
Dear Cory,
Please see section 5 of the package vignette to add lines of model
predictions to rad and octave plots. In a nutshell you need objects with
the results of each fit and then you can use these objects to get predicted
values with 'radpred' and 'octavpred'. Please also note that the data input
to 'fitsad' and 'fitrad' are numeric vectors, not matrices.
Best wishes
Paulo
2018-09-24 13:22 GMT-03:00 Cory Redman <corymredman at gmail.com>:
> I have been trying to create a plot showing maximum likelihood models
> fitted to a rank abundance curve in the 'fitsad' package in R. See
> attached pic for what I am aiming for. Y-axis can be in log scale or not.
> I can't even create a plot that shows the results of the model. I have
> looked over the online literature, but can't figure it out. Please help.
>
> Cheers,
> Cory
>
> My code:
> > library(sads)
> > Unit2 = matrix(c(529,230,129,108,98,62,40,23,18,13,9,5,3))
> > plot(Unit2)
> > Unit2.ln <- fitsad(Unit2, 'lnorm')
> > plot(Unit2.ln)
> Error in (function (classes, fdef, mtable) :
> unable to find an inherited method for function ?octav? for signature
> ?"matrix"?
>
>
>
--
*Paulo In?cio de Knegt L?pez de Prado
*Depto. de Ecologia - Instituto de Bioci?ncias - USP
Associate Editor, Ecological Complexity
<https://www.journals.elsevier.com/ecological-complexity/editorial-board>
Recommender, Peer Community in Ecology <https://ecology.peercommunityin.org/>
Address:
Rua do Mat?o, travessa 14, n? 321
Cid. Universit?ria, S?o Paulo - SP - Brasil
CEP 05508-900
+55-11-30910963 (sala)
+55-11-30917600 (Secretaria)
[[alternative HTML version deleted]]