Learn R Programming

DNAtools (version 0.1-8)

plot.dbOptim: Plots the fitted object function for estimated familial relationships in the database and theta.

Description

Plots the minimised object function for included values of theta

Usage

## S3 method for class 'dbOptim':
plot(x,type="l",...)
## S3 method for class 'dbOptim':
points(x,type="p",...)
## S3 method for class 'dbOptim':
lines(x,type="l",...)

Arguments

x
Object returned by optim.relatedness
type
The type of plot character ("l"=line, "p"=points, ...), see 'par' for more details
...
Other plot options

Value

  • A plot of the object function

Details

Plots the object function

See Also

optim.relatedness

Examples

Run this code
## Simulate some allele frequencies:
  freqs <-  replicate(10, { g = rgamma(n=10,scale=4,shape=3); g/sum(g)},
              simplify=FALSE)
  ## Load the sample database:
  data(dbExample)
  obs <- dbCompare(dbExample,trace=FALSE)$m
  C3 <- optim.relatedness(obs,theta0=0.0,theta1=0.03,probs=freqs,
          objFunction="C3",max.bisect=30,trace=TRUE)
  plot(C3)

Run the code above in your browser using DataLab