SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
y <- c(0, -0.104, 0.016, -0.085, -0.163, -0.020, -0.038, 0.008, -0.130, 0.064, -0.068, 0.000, 0.045,
-0.021, -0.012, 0.038, 0.091, -0.008, -0.008)
regxy <- lm(y ~ x)
summary(regxy)
plot(y ~ x)
abline(regxy)
plot(y ~ x, pch = 20, main = "Regressio lineal simple")
lines(regxy$fitted ~ x, lwd = 2)
for (i in 1:length(x)) {
segments(x[i], y[i], x[i], regxy$fitted[i])
}
abline(v = mean(x), lty = 3)
abline(h = mean(y), lty = 3)

Weitere ähnliche Inhalte

Was ist angesagt?

Agda であそぼ
Agda であそぼAgda であそぼ
Agda であそぼ
erutuf13
 
型理論 なんて自分には関係ないと思っているあなたへ
型理論 なんて自分には関係ないと思っているあなたへ型理論 なんて自分には関係ないと思っているあなたへ
型理論 なんて自分には関係ないと思っているあなたへ
Yusuke Matsushita
 
Coq setoid 20110129
Coq setoid 20110129Coq setoid 20110129
Coq setoid 20110129
tmiya
 

Was ist angesagt? (8)

Agda であそぼ
Agda であそぼAgda であそぼ
Agda であそぼ
 
型理論 なんて自分には関係ないと思っているあなたへ
型理論 なんて自分には関係ないと思っているあなたへ型理論 なんて自分には関係ないと思っているあなたへ
型理論 なんて自分には関係ないと思っているあなたへ
 
Intermediate Microeconomic Theory Midterm 2 "Cheat Sheet"
Intermediate Microeconomic Theory Midterm 2 "Cheat Sheet"Intermediate Microeconomic Theory Midterm 2 "Cheat Sheet"
Intermediate Microeconomic Theory Midterm 2 "Cheat Sheet"
 
Mohr's circle Samriddha Shil.....S@S
Mohr's circle Samriddha Shil.....S@SMohr's circle Samriddha Shil.....S@S
Mohr's circle Samriddha Shil.....S@S
 
Coq setoid 20110129
Coq setoid 20110129Coq setoid 20110129
Coq setoid 20110129
 
A neural attention model for sentence summarization
A neural attention model for sentence summarizationA neural attention model for sentence summarization
A neural attention model for sentence summarization
 
Fast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimizationFast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimization
 
Intermediate Microeconomics Cheat Sheets
Intermediate Microeconomics Cheat Sheets Intermediate Microeconomics Cheat Sheets
Intermediate Microeconomics Cheat Sheets
 

Prova 6

  • 1. y <- c(0, -0.104, 0.016, -0.085, -0.163, -0.020, -0.038, 0.008, -0.130, 0.064, -0.068, 0.000, 0.045, -0.021, -0.012, 0.038, 0.091, -0.008, -0.008) regxy <- lm(y ~ x) summary(regxy) plot(y ~ x) abline(regxy) plot(y ~ x, pch = 20, main = "Regressio lineal simple") lines(regxy$fitted ~ x, lwd = 2) for (i in 1:length(x)) { segments(x[i], y[i], x[i], regxy$fitted[i]) } abline(v = mean(x), lty = 3) abline(h = mean(y), lty = 3)