Description Usage Arguments Details Value See Also Examples
lnre.spc
computes the expected frequency spectrum of a LNRE
model at specified sample size N
, returning an object of class
spc
. Since almost all expected spectrum elements are non-zero,
only an incomplete spectrum can be generated.
1 |
model |
an object belonging to a subclass of |
N |
a single positive integer, specifying the sample size N for which the expected frequency spectrum is calculated (defaults to same sample size as used for estimating the model) |
variances |
if |
m.max |
number of spectrum elements listed in the frequency spectrum. The default of 100 is chosen to avoid numerical problems that certain LNRE models (in particular, GIGP) have for higher m. If variance data is included, the default value is automatically reduced to 50. |
~~ TODO, if any ~~
An object of class spc
, representing the incomplete expected
frequency spectrum of the LNRE model lnre
at sample size
N
. If variances=TRUE
, the spectrum also includes
variance data.
spc
for more information about frequency spectra and
links to relevant functions; lnre
for more information
about LNRE models and how to initialize them
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ## load Dickens dataset and compute lnre models
data(Dickens.spc)
zm <- lnre("zm",Dickens.spc)
fzm <- lnre("fzm",Dickens.spc, exact=FALSE)
gigp <- lnre("gigp",Dickens.spc)
## calculate the corresponding expected
## frequency spectra at the Dickens size
zm.spc <- lnre.spc(zm,N(Dickens.spc))
fzm.spc <- lnre.spc(fzm,N(Dickens.spc))
gigp.spc <- lnre.spc(gigp,N(Dickens.spc))
## comparative plot
plot(Dickens.spc,zm.spc,fzm.spc,gigp.spc,m.max=10)
## expected spectra at N=100e+8
## and comparative plot
zm.spc <- lnre.spc(zm,1e+8)
fzm.spc <- lnre.spc(fzm,1e+8)
gigp.spc <- lnre.spc(gigp,1e+8)
plot(zm.spc,fzm.spc,gigp.spc,m.max=10)
## with variances
zm.spc <- lnre.spc(zm,1e+8,variances=TRUE)
head(zm.spc)
## asking for more than 50 spectrum elements
## (increasing m.max will eventually lead
## to error, at different threshold for
## the different models)
zm.spc <- lnre.spc(zm,1e+8,m.max=1000)
fzm.spc <- lnre.spc(fzm,1e+8,m.max=1000)
gigp.spc <- lnre.spc(gigp,1e+8,m.max=100) ## gigp breaks first!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.