5. plot.srafit {sra} | R Documentation |
Plotting "srafit" objects
Description
These functions plot in a nice way the content of objects of class srafit
, the result of sra
model fitting.
Usage
## S3 method for class 'srafit'
plot(x, series = levels(x$data$rep), resid = FALSE,
variance = FALSE, ...)
sraPlotMean(srafit, series=levels(srafit$data$rep), legend=TRUE,
xlim=NULL, ylim=NULL, xlab=NULL, ylab=NULL, pch=1, ...)
sraPlotMeanResid(srafit, series=levels(srafit$data$rep))
sraPlotVar (srafit, series=levels(srafit$data$rep), legend=TRUE,
xlim=NULL, ylim=NULL, xlab=NULL, ylab=NULL, pch=1, ...)
sraPlotVarResid (srafit, series=levels(srafit$data$rep))
sraPlotlegend(labels, estimates, AIC=NULL, confint=NULL,
location="topleft")
sraFormatlegend(names, values, AIC=NULL, ...)
Arguments
x |
An object of class |
srafit |
An object of class |
series |
The identifier ( |
resid |
Whether or not the residuals (data - model expectation) should be displayed. |
variance |
If |
legend |
If |
xlim |
Same meaning as in |
ylim |
Same meaning as in |
xlab |
Same meaning as in |
ylab |
Same meaning as in |
pch |
Same meaning as in |
labels |
Formatted labels of the names of the estimates in the legend. |
estimates |
Values of the parameter estimates. |
AIC |
Value of the AIC. If |
confint |
Confidence intervals of the parameters. If |
location |
Location of the legend, corresponding to |
names |
Names of the parameters (as defined in the models). |
values |
Values of the parameter estimates (as defined in the models). |
... |
For |
Details
The only function that should be used by the end user is plot.srafit
.
Author(s)
Arnaud Le Rouzic
See Also
Examples
########### Generating a dummy dataset ################
m <- c(12,11,12,14,18,17,19,22,20,19)
v <- c(53,47,97,155,150,102,65,144,179,126)
s <- c(15,14,14,17,21,20,22,25,24,NA)
n <- c(100,80,120,60,100,90,110,80,60,100)
########## Making a sra data set #######################
data <- sraData(phen.mean=m, phen.var=v, phen.sel=s, N=n)
cstvar <- sraCstvar(data)
plot(cstvar)
plot(cstvar, xlim=c(3,9))
plot(cstvar, var=TRUE, ylab="This is a custom Y axis label")
plot(cstvar, resid=TRUE, legend=FALSE, main="Constant variance model fit")