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

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

Arguments

object

object of class bestfit

func

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")
#> `geom_smooth()` using formula 'y ~ x'
#> Warning: prediction from a rank-deficient fit may be misleading
shrinkPlot(fit0)
#> `stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.
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)
#> `stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.
shrinkPlot(fit, func = "log")
#> `stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.