Simulate data from a mixture model detection function
Description
Simulate data from a (line or point transect) mixture model detection function with or without covariates using rejection sampling.
Usage
1 2 
Arguments
pars 
Parameters of the model to fit. See

mix.terms 
Number of mixture components. 
n 
Number of data to generate. 
width 
Truncation distance. 
zdim 
Number of columns of 
z 
Covariate data. Defaults to NULL. See details for more information. 
pt 
Should point transect data be generated? Defaults to FALSE. 
showit 
Print the acceptance rate. Defaults to FALSE. 
Details
This routine uses rejection sampling, so may be rather slow of large sample sizes. Direct sampling will be available soon.
Value
a data.frame
with the following columns:
observed  Whether the object was
observed, always n 1s. Kept for mmds
compatability. 
object  Object identifier, numbered
1 to n . Kept for mmds compatability. 
distance  Observed distances. 
Then follows as
many columns as there are columns as z , named as
in z . 
Author(s)
David L. Miller
Examples
1 2 3 4 5 