plotall: Plot of Cq density/densities and/or density plot of data.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotall.R

Description

Produces plot of any combination of density plot of data (using plotden) and Cq density for initial, mode and mean parameters (using plotfun). Can include lines representing proprtion of negative partitions.

Usage

1
2
3
4
5
6
plotall(res, types = "dimp", detpars = NULL, leg = TRUE, 
  main = NULL, lwds = c(1, 1, 1, 1), bw = 0.025, 
  c0 = 6, maxn0 = 7, 
  cols = c("blue", "orange", "purple", "red"), 
  xlim = NULL, dxlim = c(-3.5, 2), inc0 = TRUE, 
  legx = "topright", legy = NULL, inset = 0.025, detr = NULL, ...)

Arguments

res

cqres object

types

charcters included in this string indicate which plots to include - data density plot (d), Cq densities for initial parameters (i), mode parameters (m) and mean parameters (p).

detpars

vector determining detrending if any of data for density plot. If it contains "trendx" and/or "trendy" then the trend(s) is/are removed from the data.

leg

logical, if TRUE then legend is included.

main

the main title.

lwds

vector line widths associated with data, initial, mode and mean plots respectively (see inc argument).

bw

bandwidth for density plot.

c0

number of cycles for which exact probabilities are caclulated. This can have a significant impact on speed of computation.

maxn0

the maximum number of initial molecules used in computation.

cols

colours of lines associated with data, initial, mode and mean plots respectively (see inc argument).

xlim

x-axis range (if density plot of data not included).

dxlim

x-axis range relative to approximate mean Cq for 1 initial molecule (if density plot of data not included and xlim is NULL).

inc0

logical, whether to include line representing fraction of negative partitions.

legx, legy, inset

x, y and inset arguments of legend function.

detr

a character string. If x and/or y are included then the data is detrended for that/those variables using rlm for the density plot.

...

plotting parameters.

Details

Trends are excluded from parameter density plots, so to be comparable to a data density plot the trend(s) must be removed from the data density plot (see examples).

Value

NULL

Author(s)

Philip Wilson

See Also

density

Examples

1
2
3
4
# Plot Cq density for posterior mean parameters using result of cqmc.
# Remove trend from data density plot to make comparable.
cqresult<-cqmc(fetch(Exp37a,1),E.init=.9,E1.init=.5,mc.rep=0,mod.rep=200)
plotall(cqresult,types="dim",detpars=cqresult[["pars.mc"]])

edpcr documentation built on May 2, 2019, 5:22 p.m.

Related to plotall in edpcr...