\input texinfo
@c %**start of header
@setfilename FAQ-vegan.info
@settitle vegan FAQ
@setchapternewpage on
@set FAQ_YEAR 2011
@afourpaper
@c %**end of header

@copying
@ifnottex
This document contains answers to some of the most frequently asked
questions about R package vegan. 
This is version of $Date: 2011-09-07 15:06:12 +0300 (Wed, 07 Sep 2011) $.
@end ifnottex

@quotation
This work is licensed under the Creative Commons Attribution 3.0
License. To view a copy of this license, visit
@url{http://creativecommons.org/licenses/by/3.0/} or send a letter to
Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
California, 94105, USA.

Copyright @copyright{} 2008-2011 Jari Oksanen
@end quotation
@end copying

@dircategory Programming
@direntry
* R vegan FAQ: (FAQ-vegan).             FAQ for R package vegan.
@end direntry

@finalout

@titlepage
@title vegan @acronym{FAQ}
@subtitle Frequently Asked Questions on R package vegan
@subtitle Version of $Date: 2011-09-07 15:06:12 +0300 (Wed, 07 Sep 2011) $ 
@author Jari Oksanen

@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@ifnothtml
@contents
@end ifnothtml


@ifnottex
@node Top, Introduction, (dir), (dir)
@top vegan FAQ
@insertcopying
@end ifnottex




@menu
* Introduction::                
* Ordination::                  
* Other analysis methods ::     
@end menu

@node Introduction, Ordination, Top, Top
@chapter Introduction

@menu
* What is vegan?::              
* What is R?::                  
* How to obtain vegan and R?::  
* What R packages vegan depends on?::  
* What other packages are available for ecologists?::  
* What other documentation is available for vegan?::  
* Is there a Graphical User Interface (GUI) for vegan?::  
* How to cite vegan?::          
* Version numbering in vegan::  
* How to build vegan from sources?::  
* Are there binaries for devel versions?::  
* How to report a bug in vegan?::  
* Is it a bug or a feature?::   
* Can I contribute to vegan?::  
@end menu

@node What is vegan?, What is R?, Introduction, Introduction
@section What is vegan?

Vegan is an R package for community ecologists. It contains the most
popular methods of multivariate analysis needed in analysing ecological
communities, and tools for diversity analysis, and other potentially
useful functions.  Vegan is not self-contained but it must be run under
R statistical environment, and it also depends on many other R
packages. Vegan is @url{http://www.gnu.org/philosophy/free-sw.html, free
software} and distributed under
@url{http://www.gnu.org/licenses/gpl.html, ,GPL2 license}.

@node What is R?, How to obtain vegan and R?, What is vegan?, Introduction
@section What is R?

R is a system for statistical computation and graphics.  It consists of
a language plus a run-time environment with graphics, a debugger, access
to certain system functions, and the ability to run programs stored in
script files.

R has a home page at @url{http://www.R-project.org/}.  It is
@url{http://www.gnu.org/philosophy/free-sw.html, free software}
distributed under a @acronym{GNU}-style
@url{http://www.gnu.org/copyleft/copyleft.html, copyleft}, and an
official part of the @url{http://www.gnu.org/, @acronym{GNU}} project
(``@acronym{GNU} S'').

@node How to obtain vegan and R?, What R packages vegan depends on?, What is R?, Introduction
@section How to obtain vegan and R?

Both R and latest release version of vegan can be obtained through
@url{http://cran.r-project.org,,CRAN}. Unstable development version of
vegan can be obtained through
@url{http://r-forge.r-project.org/projects/vegan/,,R-Forge}.



@node What R packages vegan depends on?, What other packages are available for ecologists?, How to obtain vegan and R?, Introduction
@section What R packages vegan depends on?

Some vegan functions depend on packages @code{MASS}, @code{mgcv},
@code{cluster} and @code{lattice}.  These all are recommended standard
R packages that should be available in every R installation.  In
addition, some vegan functions @code{require} non-standard R packages.
Vegan declares these packages only as suggested ones, and you can install vegan
and use most of its functions without these packages.  The
non-standard packages needed by some vegan functions are:
@itemize

@item Package @code{scatterplot3d}
is needed by @code{ordiplot3d}

@item Package @code{rgl}
is needed by @code{ordirgl}
and @code{rgl.isomap}

@end itemize

@node What other packages are available for ecologists?, What other documentation is available for vegan?, What R packages vegan depends on?, Introduction
@section What other packages are available for ecologists?

@acronym{CRAN} @url{http://cran.r-project.org/src/contrib/Views/,,Task
Views} include entries like @code{Environmetrics}, @code{Multivariate}
and @code{Spatial} that describe several useful packages and
functions.  If you install R package @code{ctv}, you can
inspect Task Views from your R session, and automatically install sets
of most important packages.

@node What other documentation is available for vegan?, Is there a Graphical User Interface (GUI) for vegan?, What other packages are available for ecologists?, Introduction
@section What other documentation is available for vegan?

Vegan is a fully documented R package with standard help pages.  These
are the most authoritative sources of documentation (and as a last
resource you can use the force and the read the source, as vegan is open
source).  Vegan package ships with other documents which can be read
with @code{vegandocs} command (documented in the vegan help).  The
documents included in the vegan package are
@itemize
@item
Vegan @code{NEWS} (not in the development version: only in CRAN)
@item 
Vegan @code{ChangeLog}.
@item
This document (@code{FAQ-vegan.pdf}).
@item
Short introduction to basic ordination methods in vegan
(@code{intro-vegan.pdf}).
@item
Introduction to diversity methods in vegan (@code{diversity-vegan.pdf}).
@item 
Discussion on design decisions in vegan (@code{decision-vegan.pdf}).
@item
Description of variance partition procedures in function
@code{varpart} (@code{partitioning.pdf}).
@end itemize


Web documents outside the package include:
@itemize

@item
@url{http://vegan.r-forge.r-project.org/}: vegan homepage.
@item
@url{http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf}: vegan
tutorial.

@end itemize

@node Is there a Graphical User Interface (GUI) for vegan?, How to cite vegan?, What other documentation is available for vegan?, Introduction
@section Is there a Graphical User Interface (GUI) for vegan?

Roeland Kindt has made package @code{BiodiversityR} which provides a
GUI for vegan. The package is available at 
@url{http://cran.r-project.org/src/contrib/Descriptions/BiodiversityR.html,,CRAN}.
It is not a mere GUI for vegan, but adds some new functions and
complements vegan functions in order to provide a 
workbench for biodiversity analysis. You can install @code{BiodiversityR} using
@code{install.packages("BiodiversityR")} or graphical package
management menu in R. The GUI works on Windows, MacOS X and Linux.

@node How to cite vegan?, Version numbering in vegan, Is there a Graphical User Interface (GUI) for vegan?, Introduction
@section How to cite vegan? 

Use command @code{citation("vegan")} in R to see the recommended
citation to be used in publications. 

@node Version numbering in vegan, How to build vegan from sources?, How to cite vegan?, Introduction
@section Version numbering in vegan

From version 1.10-0, vegan is developed at
@url{http://r-forge.r-project.org/projects/vegan/,,R-Forge} and there
is a general progression of version numbers mixed with stable (at
@url{http://cran.r-project.org,,CRAN}) and devel versions (at 
@url{http://r-forge.r-project.org/projects/vegan/,,R-Forge}). 

Vegan version numbers are of type x.y-z, where number y is odd for
stable release versions at @url{http://cran.r-project.org,,CRAN} and
even for unstable release versions at
@url{http://r-forge.r-project.org/projects/vegan,,F-Forge}.

@node How to build vegan from sources?, Are there binaries for devel versions?, Version numbering in vegan, Introduction
@section How to build vegan from sources?

In general, you do not need to build vegan from sources, but binary
builds of release versions are available through
@url{http://cran.r-project.org/,,CRAN} for Windows and MacOS X.  If you
use some other operating systems, you may have to use source packages.
Vegan is a standard R package, and can be built like instructed in R
documentation.  Vegan contains source files in C and @acronym{FORTRAN},
and you need appropriate compilers (which may need more work in Windows
and MacOS X).

@node Are there binaries for devel versions?, How to report a bug in vegan?, How to build vegan from sources?, Introduction
@section Are there binaries for devel versions?

@url{http://r-forge.r-project.org/projects/vegan/,,R-Forge} runs daily
tests on the devel package, and if passed, it builds source package
together with Windows and MacOS X binaries. You can install those
packages within R with command 
@code{install.packages("vegan", repos="http://r-forge.r-project.org/")}.
If you use GUI menu entry, you must select or define the R-Forge
repository. 

@node How to report a bug in vegan?, Is it a bug or a feature?, Are there binaries for devel versions?, Introduction
@section How to report a bug in vegan?

If you think you have found a bug in vegan, you should report it to
vegan maintainers or developers.  The bug report should be so detailed
that the bug can be replicated and corrected.  Preferably, you should
send an example that causes a bug.  If it needs a data set that is not
available in R, you should send a minimal data set as well. You also
should paste the output or error message in your message.  You also
should specify which version of vegan you used.

Bug reports are welcome: they are the only way to make vegan non-buggy.

Please note that you shall not send bug reports to R mailing lists,
since vegan is not a standard R package.

There also is a bug reporting tool at
@url{http://r-forge.r-project.org/projects/vegan/,,R-Forge}, but you
need to register as a site user to report bugs (this is site policy).

@node Is it a bug or a feature?, Can I contribute to vegan?, How to report a bug in vegan?, Introduction
@section Is it a bug or a feature?

It is not necessarily a bug if some function gives different
results than you expect: That may be a deliberate design decision. It
may be useful to check the documentation of the function to see what
was the intended behaviour. It may also happen that function has an
argument to switch the behaviour to match your expectation. For
instance, function @code{vegdist} always calculates quantitative
indices (when this is possible). If you expect it to calculate a
binary index, you should use argument @code{binary = TRUE}.

@node Can I contribute to vegan?,  , Is it a bug or a feature?, Introduction
@section Can I contribute to vegan?

Vegan is dependent on user contribution.  All feedback is welcome.  If
you have problem with vegan, it may be as simple as incomplete
documentation, and we'll do our best to improve the documents.

Feature requests also are welcome, but they are not necessarily
fulfilled.  A new feature will be added if it is easy to do and it looks
useful to me or in general, or if you submit code. 

Contributed code and functions are welcome and more certain to be
included than mere requests.  However, not all functions will be added,
but I they must be suitable for vegan.  We also audit the code, and
typically we edit the code in vegan style for easier maintenance.  All
included contributions will be credited.  

@node Ordination, Other analysis methods , Introduction, Top
@chapter Ordination

@menu
* I have only numeric and positive data but vegan still complaints::  
* Can you analyse binary or cover class data?::  
* Why dissimilarities in vegan differ from other sources?::  
* Zero dissimilarities in isoMDS::  
* cca fails with ``data.frame expected'' or ``"site.env" missing''::  
* Variance explained by ordination axes::  
* Is it possible to have passive points in ordination?::  
* Class variables and dummies::  
* I want to use Helmert or sum contrasts::  
* What are aliased variables and how to see them?::  
* Plotting aliased variables::  
* Constrained permutations in vegan::  
* How to use different plotting symbols in ordination graphics?::  
* How to avoid cluttered ordination graphs?::  
* Can I flip an axis in ordination diagram?::  
* Can I zoom into an ordination plot?::  
@end menu

@node  I have only numeric and positive data but vegan still complaints, Can you analyse binary or cover class data?, Ordination, Ordination
@comment  node-name,  next,  previous,  up
@section I have only numeric and positive data but vegan still complaints

You are wrong! Computers are painfully pedantic, and if they find
non-numeric or negative data entries, you really have them. Check your
data. Most common reasons for non-numeric data are that row names were
read as a non-numeric variable instead of being used as row names (check
argument @code{row.names} in reading the data), or that the column names
were interpted as data (check argument @code{header = TRUE} in reading
the data). Another common reason is that you had empty cells in your
input data, and these were interprted as missing values.

@node Can you analyse binary or cover class data?, Why dissimilarities in vegan differ from other sources?, I have only numeric and positive data but vegan still complaints, Ordination
@section Can you analyse binary or cover class data?

Yes. Most vegan methods can handle binary data or cover abundance data.
Most statistical tests are based on permutation, and do not make
distributional assumptions.  There are some methods (mainly in diversity
analysis) that need count data.  These methods check that input data are
integers, but they may be fooled by cover class data.

@node Why dissimilarities in vegan differ from other sources?, Zero dissimilarities in isoMDS, Can you analyse binary or cover class data?, Ordination
@section Why dissimilarities in vegan differ from other sources?

Most commonly the reason is that other software use presence--absence
data whereas vegan used quantitative data.  Usually vegan indices are
quantitative, but you can use argument @code{binary = TRUE} to make them
presence--absence.  However, the index name is the same in both cases,
although different names usually occur in literature.  For instance,
Jaccard index actually refers to the binary index, but vegan uses
name @code{"jaccard"} for the quantitative index, too.

Another reason may be that indices indeed are defined differently,
because people use same names for different indices.

@node Zero dissimilarities in isoMDS, cca fails with ``data.frame expected'' or ``"site.env" missing'', Why dissimilarities in vegan differ from other sources?, Ordination
@section Zero dissimilarities in isoMDS

You can use argument @code{zerodist = "add"} in @code{metaMDS} or
@code{metaMDSdist} to handle zero dissimilarities.  With this argument,
zero dissimilarities are replace with a small above zero value, and they
can be handled in @code{isoMDS}.  This is a kluge, and some people do
not like this. A more principal solution is to remove duplicate sites
using R command @code{unique}.  However, after some standardizations or
with some dissimilarity indices, originally non-unique sites can have
zero dissimilarity, and you have to resort to the kluge (or work
harder with your data).

@node cca fails with ``data.frame expected'' or ``"site.env" missing'', Variance explained by ordination axes, Zero dissimilarities in isoMDS, Ordination
@section cca fails with ``data.frame expected'' or ``"site.env" missing''

This is not a vegan error message, but it comes from the @code{cca}
function in the ade4 package. There is an unfortunate name clash, and if
you have loaded ade4 after vegan, the ade4 version of @code{cca} will
mask the vegan version. You can use the vegan version using command
@code{vegan:cca()}. If you do not need package ade4, you can detach it
with command @code{detach(package:ade4)}. 

@node Variance explained by ordination axes, Is it possible to have passive points in ordination?, cca fails with ``data.frame expected'' or ``"site.env" missing'', Ordination
@section Variance explained by ordination axes.

In general, vegan does not directly give any statistics on the
``variance explained'' by ordination axes or by the constrained axes.
This is a design decision: I think this information is normally useless
and often misleading.  In community ordination, the goal typically is
not to explain the variance, but to find the ``gradients'' or main
trends in the data.  The ``total variation'' often is meaningless, and
all proportions of meaningless values also are meaningless.  Often a
better solution explains a smaller part of ``total variation''.  For
instance, in unstandardized principal components analysis most of the
variance is generated by a small number of most abundant species, and
they are easy to ``explain'' because data really are not very
multivariate.  If you standardize your data, all species are equally
important.  The first axes explains much less of the ``total
variation'', but now they explain all species equally, and results
typically are much more useful for the whole community.  Correspondence
analysis uses another measure of variation (which is not variance), and
again it typically explains a ``smaller proportion'' than principal
componentsm but with a better result.  Detrended correspondence analysis
and nonmetric multidimensional scaling even do not try to ``explain''
the variation, but use other criteria.  All methods are incommensurable,
and it is impossible to compare methods using ``explanation of
variation''.

If you still want to get ``explanation of variation'' (or a deranged
editor requests that from you), it is possible to get this information
for some methods:
@itemize
@item Eigenvector methods:
Functions @code{rda}, @code{cca} and @code{capscale} give the variation
of conditional (partialled), constrained (canonical) and residual
components, but you must calculate the proportions by hand.  Function
@code{eigenvals} extracts the eigenvalues, and
@code{summary(eigenvals(ord))} reports the proportions explained in the
result object @code{ord}.  Function @code{RsquareAdj} gives the
R-squared and adjusted R-squared (if available) for constrained
components.  Function @code{goodness} gives the same statistics for
individual species or sites (species are unavailable with
@code{capscale}). In addition, there is a special function
@code{varpart} for unbiased partitioning of variance between up to four
separate components in redundancy analysis.

@item Detrended correspondence analysis (function @code{decorana}).
The total amount of variation is undefined in detrended correspondence
analysis, and therefore proportions from total are unknown and
undefined.  @acronym{DCA} is not a method for decomposition of
variation, and therefore these proportions would not make sense either.

@item Nonmetric multidimensional scaling. 
@acronym{NMDS} is a method for nonlinear mapping, and the concept of
of variation explained does not make sense.  However, 1 - stress^2
transforms nonlinear stress into quantity analogous to squared
correlation coefficient.  Function @code{stressplot} displays the
nonlinear fit and gives this statistic.

@end itemize

@node Is it possible to have passive points in ordination?, Class variables and dummies, Variance explained by ordination axes, Ordination
@section Is it possible to have passive points in ordination?

Vegan does not have a concept of passive points, or a point that should
only little influence the ordination results. However, you can add
points to eigenvector methods using @code{predict} functions with
@code{newdata}.  You can first perform an ordination without some
species or sites, and then you can find scores for all points using your
complete data as @code{newdata}.  The @code{predict} functions are
available for basic eigenvector methods in vegan (@code{cca},
@code{rda}, @code{decorana}, for an up-to-date list, use command
@code{methods("predict")}). You also can simulate the passive points in
R by using low weights to row and columns (this is the method used in
software with passive points). For instance, the following command makes
row 3 ``passive'': @code{dune[3,] <- 0.001*dune[3,]}.


@node Class variables and dummies, I want to use Helmert or sum contrasts, Is it possible to have passive points in ordination?, Ordination
@section Class variables and dummies

You should define a class variable as an R @code{factor}, and vegan will
automatically handle them with formula interface.  You also can define
constrained ordination without formula interface, but then you must
code your class variables by hand.

R (and vegan) knows both unordered and ordered factors.  Unordered
factors are internally coded as dummy variables, but one redundant
level is removed or aliased.  With default contrasts, the removed
level is the first one.  Ordered factors are expressed as polynomial
contrasts. Both of these contrasts explained in standard R
documentation. 

You should never make your own dummy variables, but you should use
standard R factors.  R will internally change these factors into
dummies in a consistent and correct way.

@node I want to use Helmert or sum contrasts, What are aliased variables and how to see them?, Class variables and dummies, Ordination
@section I want to use Helmert or sum contrasts

@code{vegan} uses standard R utilities for defining
contrasts. The default in standard installations is to use treatment
contrasts, but you can change the behaviour globally setting
@code{options} or locally by using keyword @code{contrasts}. Please
check the R help pages and user manuals for details.

@node What are aliased variables and how to see them?, Plotting aliased variables, I want to use Helmert or sum contrasts, Ordination
@section What are aliased variables and how to see them?

Aliased variable has no information because it can be expressed with
the help of other variables.  Such variables are automatically removed
in constrained ordination in vegan.  The aliased variables can be
redundant levels of factors or whole variables.

Vegan function @code{alias} gives the defining equations for aliased
variables.  If you only want to see the names of aliased variables or
levels in solution @code{sol}, use @code{alias(sol, names.only=TRUE)}.

@node Plotting aliased variables, Constrained permutations in vegan, What are aliased variables and how to see them?, Ordination
@section Plotting aliased variables

You can fit vectors or class centroids for aliased variables using
@code{envfit} function.  The @code{envfit} function uses weighted
fitting, and the fitted vectors are identical to the vectors in
correspondence analysis.

@node Constrained permutations in vegan, How to use different plotting symbols in ordination graphics?, Plotting aliased variables, Ordination
@section Constrained permutations in vegan

You can constrain your permutations within @code{strata} or levels of
factors. You can use stratified permutations in all @code{vegan}
functions that use permutation, such as @code{adonis}, @code{anosim},
@code{anova.cca}, @code{mantel}, @code{mrpp}, @code{envfit} and
@code{protest}.

Vegan has an alternative permutation function @code{permuted.index2}
which allows restricted permutation designs for time series, line
transects, spatial grids and blocking factors. However, that function is
not developed at the moment. Vegan is going to switch to using a
separate package (permute) for permutations.

@node How to use different plotting symbols in ordination graphics?, How to avoid cluttered ordination graphs?, Constrained permutations in vegan, Ordination
@section How to use different plotting symbols in ordination graphics?

The default ordination @code{plot} function is intended for fast
plotting and it is not very configurable. To use different plotting
symbols, you should first create and empty ordination plot with
@code{plot(..., type="n")}, and then add @code{points} or @code{text} to
the created empty frame (here @code{...} means other arguments you want
to give to your @code{plot} command). The @code{points} and @code{text}
commands are fully configurable, and allow different plotting symbols
and characters.

@node How to avoid cluttered ordination graphs?, Can I flip an axis in ordination diagram?, How to use different plotting symbols in ordination graphics?, Ordination
@section How to avoid cluttered ordination graphs?

If there is a really high number of species or sites, the graphs often
are congested and many labels are overwritten. It may be impossible to
have complete readable graphics with some data sets. However, here are
some tricks you can use:
@itemize

@item 
Use only points, possibly with different types if you do not need
to see the labels. You may need to first create an empty plot using
@code{plot(..., type="n")}, if you are not satisfied with the default
graph. (Here and below  @code{...} means other arguments you want
to give to your @code{plot} command.)

@item 
Use points and add labels to desired points using interactive
@code{identify} command if you do not need to see all labels.

@item 
Add labels using function @code{ordilabel} which uses non-transparent
background to the text. The labels still shadow each other, but the
uppermost labels are readable. Argument @code{priority} will help in
displaying the most interesting labels.

@item 
Use @code{orditorp} function that uses labels only if these can be
added to a graph without overwriting other labels, and points otherwise,
if you do not need to see all labels. You must first create an empty
plot using  @code{plot(..., type="n")}, and then add labels or points
with @code{orditorp}.  

@item 
Use @code{ordipointlabel} which uses points and text labels to the
points, and tries to optimize the location of the text to minimize the
overlap. 

@item
Ordination @code{text} and @code{points} functions have argument
@code{select} that can be used for full control of selecting items
plotted as text or points.

@item 
Use interactive @code{orditkplot} function that lets you drag
labels of points to better positions if you need to see all labels. Only
one set of points can be used. 

@item 
Most @code{plot} functions allow you to zoom to a part of the
graph using @code{xlim} and @code{ylim} arguments to reduce clutter in
congested areas.  

@end itemize

@node  Can I flip an axis in ordination diagram?, Can I zoom into an ordination plot?, How to avoid cluttered ordination graphs?, Ordination
@comment  node-name,  next,  previous,  up 
@section Can I flip an axis in ordination diagram?

Use @code{xlim} or @code{ylim} flipped limits. If you have model
@code{mod <- cca(dune)} you can flip the first axis with 
@code{plot(mod, xlim = c(3, -2))}.

@node  Can I zoom into an ordination plot?,  , Can I flip an axis in ordination diagram?, Ordination
@comment  node-name,  next,  previous,  up
@section Can I zoom into an ordination plot?
You can use @code{xlim} and @code{ylim} arguments in @code{plot} or
@code{ordiplot} to zoom into ordination diagrams. Normally you must set
both @code{xlim} and @code{ylim} because ordination plots will keep the
equal aspect ratio of axes, and they will fill the graph so that the
longer axis will fit. 

Dynamic zooming can be done with function @code{orditkplot}. You can
directly save the edited @code{orditkplot} graph in various graphic
formats, or you can export the graph object back to R and use
@code{plot} to display the results. 

@node Other analysis methods ,  , Ordination, Top
@chapter Other analysis methods

@menu
* Is there TWINSPAN?::          
* Why strata do not influence adonis results?::  
* How is deviance calculated?::  
@end menu

@node Is there TWINSPAN?, Why strata do not influence adonis results?, Other analysis methods , Other analysis methods
@section Is there TWINSPAN?

No.  It may be possible to port @acronym{TWINSPAN} to vegan, but it is
not among the vegan top priorities.  If anybody wants to try porting, I
will be happy to help.  @acronym{TWINSPAN} has a very permissive
license, and it would be completely legal to port the function into R.

@node  Why strata do not influence adonis results?, How is deviance calculated?, Is there TWINSPAN?, Other analysis methods
@comment  node-name,  next,  previous,  up
@section Why strata do not influence adonis results?
Permutation happens only within @code{strata} and this influences the
permutation distribution of the statistics and probably the significance
levels, but @code{strata} do not influence the calculation of the
statistics.


@node How is deviance calculated?,  , Why strata do not influence adonis results?, Other analysis methods
@section How is deviance calculated?

Some vegan functions, such as @code{radfit} use base R facility of
@code{family} in maximum likelihood estimation.  This allows use of
several alternative error distributions, among them @code{"poisson"}
and @code{"gaussian"}. The R @code{family} also defines the
deviance.  You can see the equations for deviance with commands like
@code{poisson()$dev} or @code{gaussian()$dev}.  

In general, deviance is 2 times log.likelihood 
shifted so that models with exact fit have zero deviance.


@bye
