This is for model.xy. Take the function for the SD, its parameters, and both predicted and observed values of the dependent variable (pred,obs) to generate a likelihood. One of the parameters is passed as testparam, for use with metrop1step. The predicted value for each observation is included, and not calculated from the predicting function.
MINIMUM_SD=.0001
MINIMUM_SD should be set in the program calling model.xy, to adjust it appropriately. If MINSD==0, then the sd can collapse to a miniscule number and drive the likelihood very high, preventing parameter searches from ever escaping the sd.
1 2 | llike.GaussModelSD(testparam, allparam, whichtest, x, pred, obs, model,
badsd, ...)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.