MixedModels.jl icon indicating copy to clipboard operation
MixedModels.jl copied to clipboard

Profiling fixed-effects parameters

Open dmbates opened this issue 5 years ago • 5 comments

Initial approach to profiling the fixed-effects parameters for a linear mixed-effects model. The quantities that are stored are ζ, the signed square root of the change in the objective (negative twice the log-likelihood) and the parameters being optimized, θ. Derived parameters, β and σ, are also stored.

This approach depends strongly on the fact that the fixed-effects parameters are coefficients in a linear predictor with identity link and multivariate Gaussian distributions. To profile such a coefficient you simply subtract its contribution to the predictor from the response and fit the reduced model.

To profile other parameters such as standard deviations or correlations of the random effects it will be necessary to change the evaluation of the objective.

dmbates avatar Feb 05 '20 21:02 dmbates

The failing CI was related to a failure to download Gadfly for the docs. I've restarted it.

palday avatar Feb 05 '20 22:02 palday

A quick look suggests that this is as embarrassingly parallel as the bootstrap, with the same shared memory issues for the model object. Should I add in multi-threading?

palday avatar Feb 05 '20 22:02 palday

Codecov Report

Merging #249 into master will decrease coverage by 2.12%. The diff coverage is 2.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #249      +/-   ##
==========================================
- Coverage   95.32%   93.20%   -2.13%     
==========================================
  Files          23       24       +1     
  Lines        1626     1663      +37     
==========================================
  Hits         1550     1550              
- Misses         76      113      +37     
Impacted Files Coverage Δ
src/MixedModels.jl 100.00% <ø> (ø)
src/profile.jl 0.00% <0.00%> (ø)
src/linearmixedmodel.jl 98.88% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ff776dc...f5b6321. Read the comment docs.

codecov-io avatar Feb 05 '20 22:02 codecov-io

@palday The number of optimizations of the objective is much lower for profiling than for parametric bootstrapping. The default here is on the order of 10x the number of fixed-effects parameters. I certainly have no objections to incorporating threads as you did for the bootstrapping but it may not be very noticeable.

dmbates avatar Feb 06 '20 16:02 dmbates

Then I'll probably leave it alone for now. I've been working on various parallelizable odds and ends lately, so I might come back for the practice reasoning about various concurrency issues.

palday avatar Feb 06 '20 17:02 palday

Starting over with this because the branch is too stale.

dmbates avatar Sep 13 '22 18:09 dmbates