# Variance matrix for a regimix object.

### Description

Calculates variance-covariance matrix from a regimix object.

### Arguments

` object` |
an object obtained from fitting a RCP (for region of common profile) mixture model. Such as that generated from a call to regimix(qv). |

` ...` |
ignored |

` object2` |
an object of class |

` method` |
the method to calculate the variance-covariance matrix. Options are:'FiniteDifference' (default), |

` nboot` |
the number of bootstrap samples to take for the bootstrap estimation. Argument is ignored if !method %in% c( |

` mc.cores` |
the number of cores to distrbute the calculations on. Default is 4. Set to 1 if the computer is running Windows (as it cannot handle forking – see mclapply(qv)). Ignored if method=='EmpiricalInfo'. |

` D.accuracy` |
The number of finite difference points used in the numerical approximation to the observed information matrix. Ignored if method != |

### Details

If method is `FiniteDifference`

, then the estimates variance matrix is based on a finite difference approximation to the observed information matrix.

If method is either "BayesBoot" or "SimpleBoot", then the estimated variance matrix is calculated from bootstrap samples of the parameter estimates. See Foster et al (in prep) for details of how the bootstrapping is actually done, and regiboot(qv) for its implementation.

### Value

A square matrix of size equal to the number of parameters. It contains the variance matrix of the parameter estimates.

### Method

vcov( object, ..., object2=NULL, method='FiniteDifference', nboot=1000, mc.cores=1, D.accuracy=2)

### Author(s)

Scott D. Foster

### References

Foster, S.D., Givens, G.H., Dornan, G.J., Dunstan, P.K. and Darnell, R. (2013) Modelling Regions of Common Profiles Using Biological and Environmental Data. Environmetrics *24*: 489–499. DOI: 10.1002/env.2245

Foster, S.D., Lyons, M. and Hill, N. (in prep.) Ecological Groupings of Sample Sites in the presence of sampling artefacts.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.