File:Hsked residual compare.svg

From LTRC

Original file (SVG file, nominally 630 × 630 pixels, file size: 213 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Comparison of residuals between first order Heteroskedastic and Homoskedastic disturbances
Deutsch: Vergleich der Residuen bei heteroskedastischen und homoskedastischen Störungen erster Ordnung
Date
Source Own work
Author Protonk (talk)
SVG genesis
InfoField
 The SVG code is valid.
 This vector image was created with unknown tool

Source code

The logo of R – programming language for statistical analysis
The logo of R – programming language for statistical analysis
This media was created with R (programming language for statistical analysis)
Here is a listing of the source used to create this file.

Deutsch ∙ македонски ∙ English ∙ +/−

English: Code can be recreated in R with the following code (Commented out)
set.seed(127)
x<-seq(1,200,1)
err<-NULL
for(i in c(1:200)) {
	err[i]<-rnorm(1,0,i)
	}
y<-3.8*x+25+err;
#Auxilliary regression
naivelm<-lm(y~x)
absresid<-abs(naivelm$residuals)
auxreg<-lm(absresid~x+0)
#no hsked
errno<-NULL
for(i in c(1:200)) {
	errno[i]<-rnorm(1,0,15)
	};
yn<-3.8*x+25+errno;
par(mfrow=c(2,1))
plot(absresid~x,pch=20,main="Heteroskedastic Residuals",ylab="Absolute Value of Residuals")
abline(coef=c(0,auxreg$coefficients),col=2)
plot(abs(lm(yn~x)$residuals)~x,pch=20,main="Homoskedastic Residuals",ylab="Absolute Value of Residuals")
abline(coef=c(lm(abs(lm(yn~x)$residuals)~x)$coefficients),col=2,lty=2);

Licensing

Protonk, the copyright holder of this work, hereby publishes it under the following licences:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported licence.
Attribution:
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the licence, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible licence as the original.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation Licence, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the licence is included in the section entitled GNU Free Documentation Licence.
You may select the licence of your choice.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current19:08, 29 July 2010Thumbnail for version as of 19:08, 29 July 2010630 × 630 (213 KB)wikimediacommons>Protonk{{Information |Description = Comparison of residuals between first order Heteroskedastic and Homoskedastic disturbances |Source = I (~~~) created this work entirely by myself. |Date = ~~~~~ |Author = ~~~ |other_versions =

Metadata