Home » date » 2010 » Dec » 14 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 14 Dec 2010 17:36:27 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1.htm/, Retrieved Tue, 14 Dec 2010 18:35:16 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1280 1024 1024 768 1120 700 1024 768 1280 800 1280 1024 1280 800 1024 768 1280 800 1280 1024 1280 800 1280 800 1280 1024 1688 949 1440 900 1600 1200 1280 800 1280 800 1280 768 1176 735 1280 800 1503 845 1440 900 1366 768 1280 768 1024 768 1280 800 2560 1440 1280 768 1024 768 1280 1024 1280 800 1440 900 1280 800 1440 900 1024 768 1440 900 1143 857 1280 800 1440 900 1280 800 1366 768 1024 768 1408 880 1366 768 1176 735 1920 1200 1257 785 1280 800 1280 800 1440 900 1680 1050 1440 900 1024 768 1140 641 1280 1024 1280 800 1280 800 1280 800 1280 800 1440 900 1280 800 1152 864 1280 1024 1280 800 1440 900 1280 800 1280 1024 1440 900 1280 800 1280 800 1440 900 1280 800 1280 1024 1600 900 1024 768 1366 768 1280 800 1280 800 1440 900 1366 768 1280 800 1024 768 1280 800 1440 900 1280 800 1280 800 1408 880 1280 800 1600 900 1600 900 1680 1050 1440 900 1440 900 917 550 1280 800 1760 990 1280 800 1280 800 1280 800 1024 768 1 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
br[t] = + 94.9736438223377 + 1.43774098707423gr[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)94.973643822337787.4092151.08650.2791480.139574
gr1.437740987074230.10257714.016100


Multiple Linear Regression - Regression Statistics
Multiple R0.767558899807279
R-squared0.58914666467336
Adjusted R-squared0.586147735218421
F-TEST (value)196.452325246626
F-TEST (DF numerator)1
F-TEST (DF denominator)137
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation137.554262316877
Sum Squared Residuals2592200.98617101


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
112801567.22041458631-287.220414586311
210241199.15872189535-175.158721895348
311201101.3923347743018.6076652257042
410241199.15872189534-175.158721895343
512801245.1664334817234.8335665182815
612801567.22041458635-287.220414586345
712801245.1664334817234.8335665182815
810241199.15872189534-175.158721895343
912801245.1664334817234.8335665182815
1012801567.22041458635-287.220414586345
1112801245.1664334817234.8335665182815
1212801245.1664334817234.8335665182815
1312801567.22041458635-287.220414586345
1416881459.38984055578228.610159444222
1514401388.9405321891451.059467810859
1616001820.26282831141-220.262828311409
1712801245.1664334817234.8335665182815
1812801245.1664334817234.8335665182815
1912801199.1587218953480.8412781046568
2011761151.7132693218924.2867306781062
2112801245.1664334817234.8335665182815
2215031309.86477790006193.135222099941
2314401388.9405321891451.059467810859
2413661199.15872189534166.841278104657
2512801199.1587218953480.8412781046568
2610241199.15872189534-175.158721895343
2712801245.1664334817234.8335665182815
2825602165.32066520922394.679334790777
2912801199.1587218953480.8412781046568
3010241199.15872189534-175.158721895343
3112801567.22041458635-287.220414586345
3212801245.1664334817234.8335665182815
3314401388.9405321891451.059467810859
3412801245.1664334817234.8335665182815
3514401388.9405321891451.059467810859
3610241199.15872189534-175.158721895343
3714401388.9405321891451.059467810859
3811431327.11766974495-184.117669744949
3912801245.1664334817234.8335665182815
4014401388.9405321891451.059467810859
4112801245.1664334817234.8335665182815
4213661199.15872189534166.841278104657
4310241199.15872189534-175.158721895343
4414081360.1857124476647.8142875523435
4513661199.15872189534166.841278104657
4611761151.7132693218924.2867306781062
4719201820.2628283114199.7371716885912
4812571223.6003186756033.3996813243949
4912801245.1664334817234.8335665182815
5012801245.1664334817234.8335665182815
5114401388.9405321891451.059467810859
5216801604.6016802502775.398319749725
5314401388.9405321891451.059467810859
5410241199.15872189534-175.158721895343
5511401016.56561653692123.434383463083
5612801567.22041458635-287.220414586345
5712801245.1664334817234.8335665182815
5812801245.1664334817234.8335665182815
5912801245.1664334817234.8335665182815
6012801245.1664334817234.8335665182815
6114401388.9405321891451.059467810859
6212801245.1664334817234.8335665182815
6311521337.18185665447-185.181856654469
6412801567.22041458635-287.220414586345
6512801245.1664334817234.8335665182815
6614401388.9405321891451.059467810859
6712801245.1664334817234.8335665182815
6812801567.22041458635-287.220414586345
6914401388.9405321891451.059467810859
7012801245.1664334817234.8335665182815
7112801245.1664334817234.8335665182815
7214401388.9405321891451.059467810859
7312801245.1664334817234.8335665182815
7412801567.22041458635-287.220414586345
7516001388.94053218914211.059467810859
7610241199.15872189534-175.158721895343
7713661199.15872189534166.841278104657
7812801245.1664334817234.8335665182815
7912801245.1664334817234.8335665182815
8014401388.9405321891451.059467810859
8113661199.15872189534166.841278104657
8212801245.1664334817234.8335665182815
8310241199.15872189534-175.158721895343
8412801245.1664334817234.8335665182815
8514401388.9405321891451.059467810859
8612801245.1664334817234.8335665182815
8712801245.1664334817234.8335665182815
8814081360.1857124476647.8142875523435
8912801245.1664334817234.8335665182815
9016001388.94053218914211.059467810859
9116001388.94053218914211.059467810859
9216801604.6016802502775.398319749725
9314401388.9405321891451.059467810859
9414401388.9405321891451.059467810859
95917885.73118671316231.2688132868380
9612801245.1664334817234.8335665182815
9717601518.33722102582241.662778974179
9812801245.1664334817234.8335665182815
9912801245.1664334817234.8335665182815
10012801245.1664334817234.8335665182815
10110241199.15872189534-175.158721895343
10213661199.15872189534166.841278104657
10314401388.9405321891451.059467810859
10412801245.1664334817234.8335665182815
10512801567.22041458635-287.220414586345
10619201647.73390986250272.266090137498
10710241199.15872189534-175.158721895343
10810241199.15872189534-175.158721895343
10916001388.94053218914211.059467810859
11011171098.5168528001518.4831471998526
11114401388.9405321891451.059467810859
1129831154.58875129604-171.588751296042
11310241199.15872189534-175.158721895343
11410241015.127875549848.87212445015768
11512801245.1664334817234.8335665182815
11614401388.9405321891451.059467810859
11712801245.1664334817234.8335665182815
11812801245.1664334817234.8335665182815
11912801245.1664334817234.8335665182815
12014401388.9405321891451.059467810859
12112801245.1664334817234.8335665182815
12210241199.15872189534-175.158721895343
12310241199.15872189534-175.158721895343
12411521337.18185665447-185.181856654469
12512801199.1587218953480.8412781046568
12610241199.15872189534-175.158721895343
12713661199.15872189534166.841278104657
12816801604.6016802502775.398319749725
12916801604.6016802502775.398319749725
13012801245.1664334817234.8335665182815
13113661199.15872189534166.841278104657
13210241199.15872189534-175.158721895343
13314401388.9405321891451.059467810859
13410241199.15872189534-175.158721895343
13512801245.1664334817234.8335665182815
13612801245.1664334817234.8335665182815
13712801245.1664334817234.8335665182815
13810241199.15872189534-175.158721895343
13912801245.1664334817234.8335665182815


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.4557547169305390.9115094338610780.544245283069461
60.3029018812629720.6058037625259430.697098118737028
70.3216281689368510.6432563378737020.678371831063149
80.296404732205080.592809464410160.70359526779492
90.3017734922860200.6035469845720410.69822650771398
100.2291586006528430.4583172013056860.770841399347157
110.2203740182459310.4407480364918610.77962598175407
120.1991243903231760.3982487806463530.800875609676824
130.1577498870458320.3154997740916650.842250112954168
140.7983901468307280.4032197063385430.201609853169272
150.8070886336673670.3858227326652660.192911366332633
160.7906977107396890.4186045785206220.209302289260311
170.7454619151664250.5090761696671490.254538084833574
180.6947467790012160.6105064419975670.305253220998784
190.6540091040464860.6919817919070280.345990895953514
200.5852152323469360.8295695353061290.414784767653064
210.5252868977886930.9494262044226130.474713102211307
220.654235777642310.6915284447153780.345764222357689
230.6344298416925680.7311403166148630.365570158307432
240.6470509870823410.7058980258353180.352949012917659
250.5966867016283430.8066265967433130.403313298371657
260.6634263393591250.673147321281750.336573660640875
270.6080693370593250.783861325881350.391930662940675
280.986392977847580.02721404430484020.0136070221524201
290.9828153554939870.03436928901202650.0171846445060132
300.9842470080542940.03150598389141190.0157529919457060
310.9937375249609990.01252495007800250.00626247503900123
320.9911646629999810.01767067400003810.00883533700001904
330.9881320136378930.02373597272421460.0118679863621073
340.9837009854736360.03259802905272760.0162990145263638
350.978597365659190.04280526868162130.0214026343408106
360.980586918884680.03882616223063850.0194130811153193
370.9748409189663980.05031816206720360.0251590810336018
380.9781546161359050.04369076772818910.0218453838640945
390.9712113241140650.05757735177186930.0287886758859347
400.9634808468232750.07303830635344920.0365191531767246
410.952969331938490.09406133612302130.0470306680615106
420.95891873872680.08216252254639870.0410812612731993
430.9632259546193480.07354809076130450.0367740453806523
440.9536084832794180.09278303344116440.0463915167205822
450.9592348124043880.08153037519122430.0407651875956122
460.947246016099360.1055079678012800.0527539839006399
470.9409790004028460.1180419991943080.0590209995971539
480.9257485542042580.1485028915914840.074251445795742
490.90781695514470.18436608971060.0921830448553
500.886888500165680.226222999668640.11311149983432
510.8648431676937210.2703136646125580.135156832306279
520.8447342267053250.3105315465893500.155265773294675
530.8175777685815260.3648444628369490.182422231418474
540.8341111526511140.3317776946977710.165888847348886
550.8281618637658520.3436762724682960.171838136234148
560.9112456013712810.1775087972574370.0887543986287187
570.8912878961150.2174242077700010.108712103885000
580.8683007921014780.2633984157970450.131699207898522
590.8421738612455830.3156522775088340.157826138754417
600.8128695305099640.3742609389800720.187130469490036
610.7829359817171350.434128036565730.217064018282865
620.7477030849610410.5045938300779180.252296915038959
630.7774953911741730.4450092176516540.222504608825827
640.886303599961020.2273928000779590.113696400038979
650.8628055212404880.2743889575190250.137194478759512
660.8380972902735520.3238054194528960.161902709726448
670.8085008704582270.3829982590835450.191499129541773
680.9164121128336020.1671757743327970.0835878871663985
690.898673736503930.202652526992140.10132626349607
700.8768691615475380.2462616769049250.123130838452462
710.8519473963670970.2961052072658050.148052603632903
720.8255059886867420.3489880226265160.174494011313258
730.7943368007832730.4113263984334550.205663199216727
740.9253010422785770.1493979154428470.0746989577214235
750.9427944129627870.1144111740744260.0572055870372129
760.951686672584380.09662665483124020.0483133274156201
770.9597911144968830.08041777100623320.0402088855031166
780.948618400491440.1027631990171180.0513815995085588
790.935085381429420.1298292371411580.0649146185705791
800.9194096930199790.1611806139600430.0805903069800215
810.9324723402406910.1350553195186180.067527659759309
820.9158201087062710.1683597825874580.0841798912937289
830.9274635471315030.1450729057369940.0725364528684971
840.9096750896549620.1806498206900760.0903249103450381
850.8891414434448580.2217171131102840.110858556555142
860.8649681114470110.2700637771059780.135031888552989
870.8373541336308480.3252917327383030.162645866369152
880.806226652009490.3875466959810180.193773347990509
890.7716025610818870.4567948778362270.228397438918113
900.8103842196666470.3792315606667070.189615780333353
910.8464621027399010.3070757945201980.153537897260099
920.819365091256430.3612698174871420.180634908743571
930.7852101611997210.4295796776005580.214789838800279
940.747381617365530.505236765268940.25261838263447
950.7420760551546950.5158478896906110.257923944845305
960.7020790355880810.5958419288238370.297920964411919
970.756967116076520.4860657678469590.243032883923480
980.718130902315860.5637381953682790.281869097684140
990.6765437456989010.6469125086021980.323456254301099
1000.6326527447429570.7346945105140860.367347255257043
1010.648761299719830.702477400560340.35123870028017
1020.6993522470958610.6012955058082770.300647752904139
1030.6525448522614870.6949102954770260.347455147738513
1040.6072452618727570.7855094762544850.392754738127243
1050.8907817644125960.2184364711748070.109218235587404
1060.9103768961389080.1792462077221830.0896231038610917
1070.91807465421390.1638506915722020.081925345786101
1080.9269586345639340.1460827308721320.0730413654360662
1090.9501573236466140.09968535270677250.0498426763533862
1100.9386056878201130.1227886243597740.0613943121798872
1110.9179884536734560.1640230926530870.0820115463265437
1120.9210764543776720.1578470912446560.078923545622328
1130.9322063080048220.1355873839903570.0677936919951784
1140.9172014100343060.1655971799313880.082798589965694
1150.8924507494942240.2150985010115530.107549250505777
1160.8584041397613630.2831917204772750.141595860238637
1170.822355669851360.3552886602972810.177644330148640
1180.7810157220833610.4379685558332770.218984277916639
1190.7347334865959970.5305330268080070.265266513404003
1200.6749478765264790.6501042469470430.325052123473521
1210.6194089054353520.7611821891292960.380591094564648
1220.6231857716683640.7536284566632710.376814228331636
1230.6384880676091440.7230238647817120.361511932390856
1240.7297614789529520.5404770420940960.270238521047048
1250.697442170152980.605115659694040.30255782984702
1260.7360957865816930.5278084268366140.263904213418307
1270.8180102902732530.3639794194534950.181989709726747
1280.7459597322996550.5080805354006910.254040267700345
1290.6943094296550380.6113811406899240.305690570344962
1300.6011058281137740.7977883437724520.398894171886226
1310.8676799524950140.2646400950099720.132320047504986
1320.8366493005481920.3267013989036160.163350699451808
13312.02666162109634e-591.01333081054817e-59
13418.67490392411492e-424.33745196205746e-42


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level20.0153846153846154NOK
5% type I error level120.0923076923076923NOK
10% type I error level230.176923076923077NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/10kchm1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/10kchm1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/1daka1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/1daka1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/2daka1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/2daka1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/36kjv1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/36kjv1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/46kjv1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/46kjv1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/56kjv1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/56kjv1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/6hbig1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/6hbig1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/792hj1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/792hj1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/892hj1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/892hj1292348177.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/992hj1292348177.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292348106fotvtud7x7rtzd1/992hj1292348177.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by