Home » date » 2008 » Dec » 13 »

paper

*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: Sat, 13 Dec 2008 06:49:32 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0.htm/, Retrieved Sat, 13 Dec 2008 14:51:36 +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/2008/Dec/13/t122917628679y53ggqsc9how0.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
6340,5 0 7901,5 0 8191,1 0 7181,7 0 7594,4 0 7384,7 0 7876,7 0 8463,4 0 8317,2 0 7778,7 0 8532,8 0 7272,2 0 6680,1 0 8427,6 0 8752,8 0 7952,7 0 8694,3 0 7787 0 8474,2 0 9154,7 0 8557,2 0 7951,1 0 9156,7 0 7865,7 0 7337,4 0 9131,7 0 8814,6 0 8598,8 0 8439,6 0 7451,8 0 8016,2 0 9544,1 0 8270,7 0 8102,2 0 9369 0 7657,7 0 7816,6 0 9391,3 0 9445,4 0 9533,1 0 10068,7 0 8955,5 0 10423,9 0 11617,2 0 9391,1 0 10872 0 10230,4 0 9221 0 9428,6 0 10934,5 0 10986 0 11724,6 0 11180,9 0 11163,2 0 11240,9 0 12107,1 0 10762,3 0 11340,4 0 11266,8 0 9542,7 0 9227,7 0 10571,9 0 10774,4 0 10392,8 0 9920,2 0 9884,9 1 10174,5 1 11395,4 1 10760,2 1 10570,1 1 10536 1 9902,6 1 8889 1 10837,3 1 11624,1 1 10509 1 10984,9 1 10649,1 1 10855,7 1 11677,4 1 10760,2 1 10046,2 1 10772,8 1 9987,7 1 8638,7 1 11063,7 1 11855,7 1 10684,5 1 11337,4 1 10478 1 11123,9 1 12909,3 1 11339,9 1 10462,2 1 12733,5 1 10519,2 1 10414,9 1 12476,8 1 12384,6 1 12266,7 1 12919,9 1 11497,3 1 12142 1 13919,4 1 12656,8 1 12034,1 1 13199,7 1 10881,3 1 11301,2 1 13643,9 1 12517 1 13981,1 1 14275,7 1 13435 1 13565,7 1 16216,3 1 12970 1 14079,9 1 14235 1 12213,4 1 12581 1
 
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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 5906.22198597221 -1277.30401026107x[t] -274.589574772598M1[t] + 1446.17899581606M2[t] + 1478.50505613185M3[t] + 1162.21111644763M4[t] + 1357.08717676341M5[t] + 747.643638105304M6[t] + 1204.13969842109M7[t] + 2450.97575873687M8[t] + 1064.88181905265M9[t] + 945.787879368435M10[t] + 1561.14393968422M11[t] + 64.2239396842171t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)5906.22198597221224.5157626.306500
x-1277.30401026107216.050221-5.912100
M1-274.589574772598259.807241-1.05690.2929390.146469
M21446.17899581606266.278915.431100
M31478.50505613185266.1559415.55500
M41162.21111644763266.0686314.36812.9e-051.5e-05
M51357.08717676341266.0170155.10151e-061e-06
M6747.643638105304266.4211562.80620.0059560.002978
M71204.13969842109266.224924.5231.6e-058e-06
M82450.97575873687266.0642559.21200
M91064.88181905265265.9392264.00420.0001155.8e-05
M10945.787879368435265.8498843.55760.0005590.00028
M111561.14393968422265.7962645.873500
t64.22393968421713.08257120.834500


Multiple Linear Regression - Regression Statistics
Multiple R0.95690842309601
R-squared0.91567373019209
Adjusted R-squared0.90542848245842
F-TEST (value)89.3754601152988
F-TEST (DF numerator)13
F-TEST (DF denominator)107
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation594.298543635704
Sum Squared Residuals37791411.2095245


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16340.55695.85635088381644.643649116188
27901.57480.8488611567420.651138843303
38191.17577.3988611567613.701138843297
47181.77325.3288611567-143.628861156701
57594.47584.42886115679.97113884329899
67384.77039.2092621828345.490737817196
77876.77559.92926218281316.770737817188
88463.48870.98926218281-407.589262182813
98317.27549.11926218281768.080737817188
107778.77494.24926218281284.450737817190
118532.88173.82926218281358.970737817188
127272.26676.90926218281595.29073781719
136680.16466.54362709443213.556372905570
148427.68251.53613736731176.063862632692
158752.88348.08613736731404.71386263269
167952.78096.01613736731-143.31613736731
178694.38355.11613736731339.18386263269
1877877809.89653839342-22.8965383934169
198474.28330.61653839342143.583461606584
209154.79641.67653839342-486.976538393415
218557.28319.80653839342237.393461606584
227951.18264.93653839342-313.836538393416
239156.78944.51653839342212.183461606584
247865.77447.59653839342418.103461606584
257337.47237.23090330504100.169096694964
269131.79022.22341357792109.476586422085
278814.69118.77341357792-304.173413577915
288598.88866.70341357791-267.903413577916
298439.69125.80341357791-686.203413577915
307451.88580.58381460402-1128.78381460402
318016.29101.30381460402-1085.10381460402
329544.110412.3638146040-868.263814604021
338270.79090.49381460402-819.793814604021
348102.29035.62381460402-933.423814604022
3593699715.20381460402-346.203814604022
367657.78218.28381460402-560.583814604021
377816.68007.91817951564-191.318179515641
389391.39792.91068978852-401.610689788522
399445.49889.46068978852-444.060689788521
409533.19637.39068978852-104.290689788520
4110068.79896.49068978852172.209310211480
428955.59351.27109081463-395.771090814628
4310423.99871.99109081463551.908909185372
4411617.211183.0510908146434.148909185373
459391.19861.18109081463-470.081090814627
46108729806.311090814631065.68890918537
4710230.410485.8910908146-255.491090814628
4892218988.97109081463232.028909185373
499428.68778.60545572625649.994544273754
5010934.510563.5979659991370.902034000873
511098610660.1479659991325.852034000874
5211724.610408.07796599911316.52203400087
5311180.910667.1779659991513.722034000873
5411163.210121.95836702521041.24163297477
5511240.910642.6783670252598.221632974766
5612107.111953.7383670252153.361632974767
5710762.310631.8683670252130.431632974765
5811340.410576.9983670252763.401632974766
5911266.811256.578367025210.2216329747667
609542.79759.65836702523-216.958367025232
619227.79549.29273193685-321.592731936852
6210571.911334.2852422097-762.385242209734
6310774.411430.8352422097-656.435242209732
6410392.811178.7652422097-785.965242209731
659920.211437.8652422097-1517.66524220973
669884.99615.34163297477269.558367025232
6710174.510136.061632974838.4383670252339
6811395.411447.1216329748-51.7216329747669
6910760.210125.2516329748634.948367025234
7010570.110070.3816329748499.718367025233
711053610749.9616329748-213.961632974767
729902.69253.04163297477649.558367025234
7388899042.67599788639-153.675997886386
7410837.310827.66850815939.6314918407335
7511624.110924.2185081593699.881491840735
761050910672.1485081593-163.148508159265
7710984.910931.248508159353.651491840734
7810649.110386.0289091854263.071090814627
7910855.710906.7489091854-51.0489091853717
8011677.412217.8089091854-540.408909185372
8110760.210895.9389091854-135.738909185372
8210046.210841.0689091854-794.868909185372
8310772.811520.6489091854-747.848909185373
849987.710023.7289091854-36.0289091853711
858638.79813.363274097-1174.66327409699
8611063.711598.3557843699-534.655784369871
8711855.711694.9057843699160.794215630129
8810684.511442.8357843699-758.335784369871
8911337.411701.9357843699-364.535784369871
901047811156.7161853960-678.716185395979
9111123.911677.4361853960-553.536185395978
9212909.312988.4961853960-79.1961853959782
9311339.911666.6261853960-326.726185395978
9410462.211611.7561853960-1149.55618539598
9512733.512291.3361853960442.163814604022
9610519.210794.4161853960-275.216185395977
9710414.910584.0505503076-169.150550307598
9812476.812369.0430605805107.756939419522
9912384.612465.5930605805-80.9930605804765
10012266.712213.523060580553.1769394195241
10112919.912472.6230605805447.276939419523
10211497.311927.4034616066-430.103461606585
1031214212448.1234616066-306.123461606583
10413919.413759.1834616066160.216538393416
10512656.812437.3134616066219.486538393416
10612034.112382.4434616066-348.343461606583
10713199.713062.0234616066137.676538393417
10810881.311565.1034616066-683.803461606584
10911301.211354.7378265182-53.5378265182022
11013643.913139.7303367911504.169663208917
1111251713236.2803367911-719.280336791083
11213981.112984.2103367911996.889663208918
11314275.713243.31033679111032.38966320892
1141343512698.0907378172736.90926218281
11513565.713218.8107378172346.889262182812
11616216.314529.87073781721686.42926218281
1171297013208.0007378172-238.000737817189
11814079.913153.1307378172926.76926218281
1191423513832.7107378172402.289262182811
12012213.412335.7907378172-122.390737817189
1211258112125.4251027288455.574897271191


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.07220723919122380.1444144783824480.927792760808776
180.02968930915221360.05937861830442730.970310690847786
190.00909796984142120.01819593968284240.990902030158579
200.002656653704940580.005313307409881160.99734334629506
210.001803323473181250.003606646946362510.998196676526819
220.001273638096300550.00254727619260110.9987263619037
230.000410373094217270.000820746188434540.999589626905783
240.0001299168638523350.000259833727704670.999870083136148
253.72330480680559e-057.44660961361118e-050.999962766951932
261.21369722578842e-052.42739445157685e-050.999987863027742
272.49623970458331e-054.99247940916662e-050.999975037602954
281.15767391884147e-052.31534783768294e-050.999988423260812
291.95578608982100e-053.91157217964201e-050.999980442139102
300.0002631757435439870.0005263514870879730.999736824256456
310.0009792892427447570.001958578485489510.999020710757255
320.0005824541011991120.001164908202398220.9994175458988
330.001248729092466110.002497458184932220.998751270907534
340.0009440720777445460.001888144155489090.999055927922256
350.0004697380662231230.0009394761324462450.999530261933777
360.0003705778283339480.0007411556566678950.999629422171666
370.0002526682720698510.0005053365441397020.99974733172793
380.0001384032662351950.0002768065324703900.999861596733765
397.13700318296091e-050.0001427400636592180.99992862996817
400.0002460021586873020.0004920043173746050.999753997841313
410.0009519928958283280.001903985791656660.999048007104172
420.0009408564120889060.001881712824177810.999059143587911
430.007156610885370130.01431322177074030.99284338911463
440.03585347112868820.07170694225737650.964146528871312
450.02689677631854190.05379355263708380.973103223681458
460.1392766725335380.2785533450670760.860723327466462
470.108932585195380.217865170390760.89106741480462
480.09037701773425180.1807540354685040.909622982265748
490.1086520030244760.2173040060489530.891347996975524
500.1022763194826780.2045526389653560.897723680517322
510.09182704789308080.1836540957861620.908172952106919
520.2872795848079870.5745591696159740.712720415192013
530.2908812083256630.5817624166513250.709118791674337
540.4508175101715930.9016350203431860.549182489828407
550.475749130779440.951498261558880.52425086922056
560.4361673425218990.8723346850437970.563832657478101
570.394383791191820.788767582383640.60561620880818
580.5009266990559340.9981466018881320.499073300944066
590.4739253139949050.947850627989810.526074686005095
600.4609798545854850.921959709170970.539020145414515
610.4850744272970480.9701488545940960.514925572702952
620.4877673842286850.975534768457370.512232615771315
630.4841287522016380.9682575044032750.515871247798362
640.5053945832020120.9892108335959760.494605416797988
650.5735370151905050.852925969618990.426462984809495
660.5368240942248160.9263518115503680.463175905775184
670.4971057051119350.994211410223870.502894294888065
680.4381049439029650.876209887805930.561895056097035
690.478830355869530.957660711739060.52116964413047
700.5445989159492280.9108021681015430.455401084050772
710.4980804767817600.9961609535635210.501919523218240
720.6279353994429820.7441292011140350.372064600557018
730.6255216071143270.7489567857713460.374478392885673
740.5881222380890050.823755523821990.411877761910995
750.744251744169730.5114965116605420.255748255830271
760.7068838366381290.5862323267237420.293116163361871
770.6596705638672660.6806588722654670.340329436132734
780.7172546686646880.5654906626706250.282745331335312
790.7404629044707690.5190741910584630.259537095529231
800.708962281368070.5820754372638610.291037718631931
810.7172477888148280.5655044223703450.282752211185172
820.7094095690092570.5811808619814870.290590430990743
830.6785502460584180.6428995078831640.321449753941582
840.7824824060990130.4350351878019740.217517593900987
850.7919591815199440.4160816369601120.208040818480056
860.746045942681310.507908114637380.25395405731869
870.8513979041074040.2972041917851930.148602095892596
880.8472344941784580.3055310116430840.152765505821542
890.819985992143360.360028015713280.18001400785664
900.7766643966498870.4466712067002270.223335603350113
910.717479262803090.5650414743938210.282520737196910
920.6733345222037230.6533309555925530.326665477796277
930.6077469239439160.7845061521121680.392253076056084
940.6845930850369640.6308138299260720.315406914963036
950.7086798642532890.5826402714934220.291320135746711
960.7427572786174570.5144854427650860.257242721382543
970.6935596514346480.6128806971307050.306440348565352
980.6075232498203290.7849535003593420.392476750179671
990.7839183193420810.4321633613158380.216081680657919
1000.7029277441002140.5941445117995720.297072255899786
1010.6024273345360390.7951453309279230.397572665463961
1020.5270875729788080.9458248540423830.472912427021192
1030.3825451149224160.7650902298448320.617454885077584
1040.4668708656637280.9337417313274550.533129134336272


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level230.261363636363636NOK
5% type I error level250.284090909090909NOK
10% type I error level280.318181818181818NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/10910i1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/10910i1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/1ihxa1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/1ihxa1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/2snzw1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/2snzw1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/3ca5i1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/3ca5i1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/41z8e1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/41z8e1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/5mzdf1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/5mzdf1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/6wxmd1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/6wxmd1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/712kr1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/712kr1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/88z9x1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/88z9x1229176166.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/91iiq1229176166.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t122917628679y53ggqsc9how0/91iiq1229176166.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = 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