plotfun: Plot of Cq distribution

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

View source: R/plotfun.R

Description

Produces plot of the Cq distribution given the provided parameters. Can include a line representing the proprtion of negative partitions.

Usage

1
2
3
4
5
plotfun(pars = NULL, h = 0.1, xlim = NULL, 
  dxlim = c(-3, 2.5), new = TRUE, npoints = 10^3, 
  c0 = 6, maxn0 = 7, inc0 = TRUE, type = 0, 
  xlab = expression("C"["q"]), ylab = "density", 
  col = "black", ...)

Arguments

pars

parameters or list, such as cqres object produced by cqmc, that includes the parameters (see type).

h

threshold value

xlim

x-axis range

dxlim

x-axis range relative to approximate mean Cq for 1 initial molecule (used if xlim is NULL).

new

logical, if FALSE, adds plot to existing plot

npoints

number of points calculated for plotting

c0

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.

inc0

logical, if TRUE include line representing fraction of negative partitions.

type

character specifying which vector of parameters to use if pars is a list ("i": pars0, "m": pars.mod, "p": pars.mc).

xlab

x-axis label

ylab

y-axis lable

col

colour of lines

...

plotting parameters

Details

Plots the density of Cq given the specified parameters. The parameters are given by pars and if pars is a list also by type.

If the parameters include "trendx" and/or "trendy" they are ignored.

Value

A list with components:

x

x values plotted.

y

y values plotted.

p0

probability of 0 molecules if inc0 is TRUE and NA otherwise.

Author(s)

Philip Wilson

See Also

plotall

Examples

1
2
3
4
5
6
7
pars0<-get.pars0(fetch(Exp37a,1))
plotfun(pars0)

# Plot Cq density for posterior mean parameters 
# using result of cqmc.
cqresult<-cqmc(fetch(Exp37a,1),E.init=.9,E1.init=.5,mc.rep=0,mod.rep=200)
plotfun(cqresult,type="m",dxlim=c(-4,3))

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

Related to plotfun in edpcr...