Ten plik znajduje się w Wikimedia Commons i może być używany w innych projektach.
Poniżej znajdują się informacje ze strony opisu tego pliku.
Opis
OpisStein's Paradox as a linear regression.png
English: Estimation of five independent real variables with either the observed means (black circles) or linear regression predictions (red diamonds). Illustrates the Stein's Paradox understood as a basic regression.
Based upon "Galtonian Perspective on Shrinkage Estimators" (Stigler, 1990). Generated in R with the following code:
library(ggplot2)
p <- 5; n <- 100 # number of variables and simulation runs
fakedata <- setNames(data.frame(matrix(nrow=p, ncol=3)), c("real", "observed", "predicted"))
RMSE <- setNames(data.frame(matrix(nrow=n, ncol=2)), c("RMSE of mean", "RMSE of regression"))
for (j in 1:n) {
for (i in 1:p) {
fakedata[i,1] <-runif(1,1,10)
fakedata[i,2] <- mean(rnorm(100, fakedata[i,1], runif(1,1,20)))
}
fit <- lm(observed~real, fakedata)
fakedata$predicted <- predict(fit)
RMSE[j,1] <- mean((fakedata$real - fakedata$observed)^2)
RMSE[j,2] <- mean((fakedata$real - fakedata$predicted)^2)
}
sprintf("RMSE of means = %.2f, RMSE of regressions = %.2f", mean(RMSE$`RMSE of mean`), mean(RMSE$`RMSE of regression`))
ggplot(fakedata, aes(x=real,y=observed)) +
geom_point(shape=21, fill="black", size=3) +
geom_point(aes(y=predicted), fill="red", shape=23, size=3) +
theme(axis.title.x = element_blank(), axis.title.y = element_blank())
dzielić się – kopiować, rozpowszechniać, odtwarzać i wykonywać utwór
modyfikować – tworzyć utwory zależne
Na następujących warunkach:
uznanie autorstwa – musisz określić autorstwo utworu, podać link do licencji, a także wskazać, czy utwór został zmieniony. Możesz to zrobić w każdy rozsądny sposób, o ile nie będzie to sugerować, że licencjodawca popiera Ciebie lub Twoje użycie utworu.
na tych samych warunkach – Jeśli zmienia się lub przekształca niniejszy utwór, lub tworzy inny na jego podstawie, można rozpowszechniać powstały w ten sposób nowy utwór tylko na podstawie tej samej lub podobnej licencji.