shrinkPlot | R Documentation |
Computes fitted values from lm package and plots aside of observed values
shrinkPlot(object, FUN = "identity", ...)
object |
object of class |
FUN |
function used to transform the response (defaults to identity) |
a shrinkage prediction plot
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.