You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that both checks in calibrate.R fail:
xname <- all.vars(stats::formula(object)[[3L]])
if (length(xname) != 1L) {
stop("Only one independent variable allowed.")
}
passes, because poly(actual,2) only returns "actual".
mf <- stats::model.frame(object)
if (ncol(mf) != 2) {
stop("calibrate only works for the simple linear regression model.")
}
passes, because poly() returns a matrix which model.frame returns as matrix column, so ncol(mf) == 2.
additional or modified checks required. To me its also unclear why xname is extracted from formula(object) instead of simply object$terms and why x and y are not simply taken from the model frame (since it must be linear).
The text was updated successfully, but these errors were encountered:
calibrate()
is only defined for linear regression models, however, the following code worksThe problem is that both checks in calibrate.R fail:
passes, because
poly(actual,2)
only returns"actual"
.passes, because
poly()
returns a matrix whichmodel.frame
returns as matrix column, soncol(mf) == 2
.additional or modified checks required. To me its also unclear why
xname
is extracted fromformula(object)
instead of simplyobject$terms
and whyx
andy
are not simply taken from the model frame (since it must be linear).The text was updated successfully, but these errors were encountered: