logitreg {analogue} | R Documentation |
Fits logistic regression models to each level of group
to
model the probability of two samples being analogues conditional upon
the dissimilarity between the two samples.
logitreg(object, groups, k = 1, ...) ## Default S3 method: logitreg(object, groups, k = 1, ...) ## S3 method for class 'analog': logitreg(object, groups, k = 1, ...) ## S3 method for class 'logitreg': summary(object, p = 0.9, ...)
object |
for logitreg ; a full dissimilarity matrix. For
summary.logitreg an object of class "logitreg" , the
result of a call to logitreg . |
groups |
factor (or object that can be coerced to one) containing
the group membership for each sample in object . |
k |
numeric; the k closest analogues to use in the model
fitting. |
p |
probability at which to predict the dose needed. |
... |
arguments passed to other methods. |
Fits logistic regression models to each level of group
to
model the probability of two samples being analogues (i.e. in the same
group) conditional upon the dissimilarity between the two samples.
This function can be seen as a way of directly modelling the
probability that two sites are analogues, conditional upon
dissimilarity, that can also be done less directly using
roc
and bayesF
.
logitreg
returns an object of class "logitreg"
; a list
whose components are objects returned by glm
. See
glm
for further details on the returned objects.
The components of this list take their names from group
.
For summary.logitreg
an object of class
"summary.logitreg"
, a data frame with summary statistics of the
model fits. The components of this data frame are:
In, Out |
The number of analogue and non-analogue dissimilarities analysed in each group, |
Est.(Dij), Std.Err |
Coefficient and its standard error for dissimilarity from the logit model, |
Z-value, p-value |
Wald statistic and associated p-value for each logit model. |
Dij(p=?), Std.Err(Dij) |
The dissimilarity at which the posterior
probability of two samples being analogues is equal to p, and
its standard error. These are computed using
dose.p . |
The function may generate warnings from function
glm.fit
. These should be investigated and not simply
ignored.
If the message is concerns fitted probabilities being numerically 0 or
1, then check the fitted values of each of the models. These may well
be numerically 0 or 1. Heed the warning in glm
and read
the reference cited therein which may indicate problems with
the fitted models, such as (quasi-)complete separation.
Gavin L. Simpson
## continue the example from ?roc example(roc) ## fit the logit models to the analog object swap.lrm <- logitreg(swap.ana, grps) swap.lrm ## summary statistics summary(swap.lrm) ## plot the fitted logit curves plot(swap.lrm, conf.type = "polygon")