shrinkPlot: Create plots to show prediction shrinkage

View source: R/shrinkPlot.R

shrinkPlotR Documentation

Create plots to show prediction shrinkage

Description

Computes fitted values from lm package and plots aside of observed values

Usage

shrinkPlot(object, FUN = "identity", ...)

Arguments

object

object of class bestfit

FUN

function used to transform the response (defaults to identity)

Value

a shrinkage prediction plot

Examples

library(sf)
dados <- st_drop_geometry(centro_2015)
fit0 <- lm(valor ~ 1, dados)
powerPlot(fit0, axis = "inverted")
shrinkPlot(fit0)
dados$padrao <- as.numeric(dados$padrao)
fit <- lm(log(valor)~area_total + quartos + suites + garagens +
log(dist_b_mar) + I(1/padrao), data = dados, subset = -c(31, 39))
shrinkPlot(fit)
shrinkPlot(fit, FUN = "log")

lfpdroubi/appraiseR documentation built on April 14, 2024, 10:27 p.m.