powered by
Parameter estimation for Markov random fields via Pseudo-Likelihood function optimization. See pl_mrf2d for information on the Pseudo-Likelihood function.
pl_mrf2d
fit_pl( Z, mrfi, family = "onepar", init = 0, optim_args = list(method = "BFGS"), return_optim = FALSE )
A matrix object containing the observed MRF. NA values can be used to create a subregion of the lattice for non-rectangular data.
matrix
NA
A mrfi object representing the interaction structure.
mrfi
The family of parameter restrictions to potentials. Families are: 'onepar', 'oneeach', 'absdif', 'dif' or 'free'. See mrf2d-familiy.
'onepar'
'oneeach'
'absdif'
'dif'
'free'
mrf2d-familiy
The initial value to be used in the optimization. It can be:
A valid array of parameter values according to family.
array
family
0. If set to 0 an array with `0`` in all entries is created.
0
Additional parameters passed to optim().
optim()
logical indicating whether information from the optim() call are returned.
logical
An object of class mrfout with elements:
mrfout
theta: The estimated array of potential values.
theta
mrfi: The interaction structure considered.
family: The parameter restriction family considered.
method: The estimation method ("Pseudolikelihood").
method
"Pseudolikelihood"
value: The optimal pseudo-likelihood value.
value
opt.xxx(if return_optim is TRUE): Information returned by the optim() function used for the optimization.
opt.xxx
return_optim
TRUE
A paper with detailed description of the package can be found at 10.18637/jss.v101.i08.
# NOT RUN { fit_pl(Z_potts, mrfi(1), family = "onepar") fit_pl(Z_potts, mrfi(1), family = "oneeach") fit_pl(Z_potts, mrfi(2), family = "onepar") # }
Run the code above in your browser using DataLab