Regression - Diagnostic - StandardRPlot - Goodness of Fit
Jump to navigation
Jump to search

Produces a scatterplot of target outcomes (x-axis) versus fitted values (y-axis). The Spearman's rank correlation coefficient is shown. A high correlation indicates that fitted values are ranked in a similar order to target outcomes. Points should be randomly scattered around a 45 degree line through the origin.
Example
Options
Regression An R Output containing a regression analysis.
Maximum points The maximum number of points to plot. If the object contains more data points, a random sample is taken.
Code
var __webpack_modules__ = ({});
// The module cache
var __webpack_module_cache__ = {};
// The require function
function __webpack_require__(moduleId) {
// Check if module is in cache
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== undefined) {
return cachedModule.exports;
}
// Create a new module (and put it into the cache)
var module = (__webpack_module_cache__[moduleId] = {
exports: {}
});
// Execute the module function
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
// Return the exports of the module
return module.exports;
}
// webpack/runtime/rspack_version
(() => {
__webpack_require__.rv = () => ("1.7.2")
})();
// webpack/runtime/rspack_unique_id
(() => {
__webpack_require__.ruid = "bundler=rspack@1.7.2";
})();
var heading_text = "Goodness of Fit";
if (!!form.setObjectInspectorTitle)
form.setObjectInspectorTitle(heading_text);
else
form.setHeading(heading_text);
form.dropBox({ name: "formInput", label: "Regression:", types: ["RItem:Regression"],
prompt: "Select a Regression output to plot fitted values for" });
form.numericUpDown({ name: "formMaxPoints", label: "Maximum points", default_value: 1000,
increment: 1, minimum: 2, maximum: Number.MAX_SAFE_INTEGER, prompt: "The maximum number of observations to plot" });
library(flipRegression)
goodness.of.fit <- GoodnessOfFitPlot(formInput, max.points = formMaxPoints)