Likelihood profiles for fitted strategic models
Calculate profile likelihood to assess convergence of a model.
"profile"(fitted, which = 1:p, steps = 5, dist = 3, use.se = TRUE, report = TRUE, ...)
- a fitted model of class
- integer vector giving the indices of the parameters to be profiled. The default is to use all parameters. Parameters that were held fixed in the original fitting are ignored if selected.
- number of steps to take (in each direction) from the original value for each parameter to be profiled.
- distance the last step should be from the original parameter
value (in terms of standard errors if
TRUE; absolute value otherwise). Should be a numeric vector of length equal to 1 or
- logical: whether
distrefers to standard errors
- logical: whether to print status bar (for complex models or those with many parameters, profiling can be lengthy)
- other arguments to be passed to the fitting function (see odemaxLik).
Likelihood profiling can help determine if a model fit failed to reach a
global maximum, which can be an issue (especially for the
ultimatum model). The process of profiling is as follows: a
parameter selected to be profiled is fixed at certain values spaced around
its originally estimated value, while the log-likelihood is maximized with
respect to the other parameters in the model. For models with large numbers
of observations or parameters, profiling may take a long time, as $p * (2s + 1)$ models will be fit (p: number of parameters;
s: number of steps).
The function will issue a warning if a model fit in profiling has a
log-likelihood exceeding that of the original model. This means the
original fit failed to reach a global maximum, and any inferences based on
the fitted model are invalid. If this occurs, refit the model, passing the
profile.game output to the fitting function's
(as in the example below). The new fit will use the coefficients from the
profile fit with the highest log-likelihood as starting values.
The function is based loosely on
profile.glm in the MASS
package. However, that function focuses on the calculation of exact
confidence intervals for regression coefficients, whereas this one is for
diagnosing non-convergence. Future versions of the games package may
incorporate the confidence interval functionality as well.
A list of data frames, each containing the estimated coefficients
across the profiled values for a particular parameter. The first column of
each data frame is the log-likelihood for the given fits. The returned
object is of class
plot.profile.game for plotting profiled likelihoods
data("student_offers") ## A model that does not converge to global max f1 <- offer + accept ~ gender1 | gender2 m1 <- ultimatum(f1, maxOffer = 100, data = student_offers, s2 = 1) p1 <- profile(m1) ## Issues warning plot(p1) ## Refit model with better starting values m2 <- ultimatum(f1, maxOffer = 100, data = student_offers, s2 = 1, profile = p1) p2 <- profile(m2) plot(p2) logLik(m1) logLik(m2) ## Improved