fitWarpedBayesModel: fitWarpedBayesModel

Description Usage Arguments Details Value See Also Examples

Description

A convenience function that packages several commonly popular moves that let a model do optimizaiotn.

Usage

1
2
3
fitWarpedBayesModel(model, stimuli, responses, responseGrid = NULL,
  initialPars = NULL, fixedPars = NULL, control = list(maxit = 5000,
  reltol = 1e-199), fit = TRUE, optimizing = "subjectiveLogLikelihood")

Arguments

model

a model that has the general layout of the "bayesian..." models included in this package.

stimuli

a vector of stimuli, in whatever raw format you like.

responses

a vector of stimuli, in whatever raw format you like.

responseGrid

a vector of possible responses, for discretizing the normal distribution

initialPars

an initial set of any parameter values you expect optim to optimize over

fixedPars

a fixed set of any parameter values you do not expect optim to optimize over

control

Passed directly into optim's control parameter

fit

If set to false, simply returns the function evaluation over the initial parameters. This is mostly useful for debugging

optimizing

What criterion should be optimized? Current valid values are "Objective RMSE" and "subjectiveLogLikelihood". subjectiveLogLikelihood is currently considered to be confusing, and is not recommended for the naive user.

Details

The returned avalue includes two columns that are different on each lineā€“the meanExpecation of the fitted model, and one simulation sampled from the final parameters. Several more columns pass through the results of hte fit (value, counts, and convergence). Finally, one column will be made per parameter. This format is a convenient one if you plan to attach your model fits (and predictions) to a stimulus tibble.

Value

A tibble that contains one row for each stimulus/response pair, and includes several columns (see details for details)

See Also

bayesianHuttenlocherSpatialMemory

Examples

1
2
3
4
a <- fitWarpedBayesModel(bayesianGonzalezWu, 
                         1:1000/1000, 
                         bayesianGonzalezWu(1:1000/1000, mode="simulation"), 
                         initialPars = c(kappa=1, tauStimuli=100, tauCategory=10))

dlandy/WarpedBayes documentation built on May 29, 2019, 2:49 p.m.