File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,25 @@ This is usually the model containing only the intercept.
76
76
nullloglikelihood (model:: StatisticalModel ) =
77
77
error (" nullloglikelihood is not defined for $(typeof (model)) ." )
78
78
79
+ """
80
+ loglikelihood(model::StatisticalModel, ::Colon)
81
+
82
+ Return a vector of each observation's contribution to the log-likelihood of the model.
83
+ In other words, this is the vector of the pointwise log-likelihood contributions.
84
+
85
+ In general, `sum(loglikehood(model, :)) == loglikelihood(model)`.
86
+ """
87
+ loglikelihood (model:: StatisticalModel , :: Colon ) =
88
+ error (" loglikelihood(model::StatisticalModel, ::Colon) is not defined for $(typeof (model)) ." )
89
+
90
+ """
91
+ loglikelihood(model::StatisticalModel, observation)
92
+
93
+ Return the contribution of `observation` to the log-likelihood of `model`.
94
+ """
95
+ loglikelihood (model:: StatisticalModel , observation) =
96
+ error (" loglikelihood(model::StatisticalModel, observation) is not defined for $(typeof (model)) ." )
97
+
79
98
"""
80
99
score(model::StatisticalModel)
81
100
You can’t perform that action at this time.
0 commit comments