FitMatching function

Fit Latent Trait (Matching Model)

Fit Latent Trait (Matching Model)

Repeatedly fits a latent trait model to a binary interaction network to return a probability matrix

FitMatching( list, N_runs = 10, maxit = 10000, method = "Nelder-Mead", ExtraSettings = NULL )

Arguments

  • list: Network List
  • N_runs: Number of start points for k2 and lambda to try. The best (maximum likelihood) half will be used to construct the probability matrix
  • maxit: Default = 10'000
  • method: Passed to optim, default = 'Nelder-Mead'
  • ExtraSettings: Other control settings to pass to optim()

Returns

Network list with added 'M_par',the best fitting parameters, 'M_ProbsMatrix', the probability matrix

Details

The optimiser is started at values derived from the row-sums and column-sums of a CCA analysis, which correspond closely to latent traits by matching closely related species together.

The k2 and lambda parameters are started from points drawn from a uniform distribution 0:1.

  • Maintainer: Chris Terry
  • License: GPL-3
  • Last published: 2024-06-10

Useful links