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 08:01:35 -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/t1229180577r3udhyg5h12rzt3.htm/, Retrieved Sat, 13 Dec 2008 16:03:07 +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/t1229180577r3udhyg5h12rzt3.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] = + 9116.21538461539 + 2593.99532967033x[t] + e[t]


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


Multiple Linear Regression - Regression Statistics
Multiple R0.672066250063232
R-squared0.451673044474055
Adjusted R-squared0.44706525493182
F-TEST (value)98.023800855928
F-TEST (DF numerator)1
F-TEST (DF denominator)119
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1437.01541671755
Sum Squared Residuals245736583.638187


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16340.59116.21538461535-2775.71538461535
27901.59116.21538461538-1214.71538461538
38191.19116.21538461539-925.115384615385
47181.79116.21538461539-1934.51538461539
57594.49116.21538461539-1521.81538461539
67384.79116.21538461539-1731.51538461539
77876.79116.21538461539-1239.51538461539
88463.49116.21538461539-652.815384615386
98317.29116.21538461539-799.015384615385
107778.79116.21538461539-1337.51538461539
118532.89116.21538461539-583.415384615386
127272.29116.21538461539-1844.01538461539
136680.19116.21538461539-2436.11538461538
148427.69116.21538461539-688.615384615385
158752.89116.21538461539-363.415384615386
167952.79116.21538461539-1163.51538461539
178694.39116.21538461539-421.915384615386
1877879116.21538461539-1329.21538461539
198474.29116.21538461539-642.015384615385
209154.79116.2153846153938.4846153846155
218557.29116.21538461539-559.015384615385
227951.19116.21538461539-1165.11538461538
239156.79116.2153846153940.4846153846155
247865.79116.21538461539-1250.51538461539
257337.49116.21538461539-1778.81538461539
269131.79116.2153846153915.4846153846154
278814.69116.21538461539-301.615384615385
288598.89116.21538461539-517.415384615386
298439.69116.21538461539-676.615384615385
307451.89116.21538461539-1664.41538461539
318016.29116.21538461539-1100.01538461539
329544.19116.21538461539427.884615384615
338270.79116.21538461539-845.515384615385
348102.29116.21538461539-1014.01538461539
3593699116.21538461539252.784615384615
367657.79116.21538461539-1458.51538461539
377816.69116.21538461539-1299.61538461538
389391.39116.21538461539275.084615384614
399445.49116.21538461539329.184615384614
409533.19116.21538461539416.884615384615
4110068.79116.21538461539952.484615384615
428955.59116.21538461539-160.715384615385
4310423.99116.215384615391307.68461538461
4411617.29116.215384615392500.98461538462
459391.19116.21538461539274.884615384615
46108729116.215384615391755.78461538461
4710230.49116.215384615391114.18461538461
4892219116.21538461539104.784615384615
499428.69116.21538461539312.384615384615
5010934.59116.215384615391818.28461538462
51109869116.215384615391869.78461538462
5211724.69116.215384615392608.38461538462
5311180.99116.215384615392064.68461538461
5411163.29116.215384615392046.98461538462
5511240.99116.215384615392124.68461538461
5612107.19116.215384615392990.88461538462
5710762.39116.215384615391646.08461538461
5811340.49116.215384615392224.18461538461
5911266.89116.215384615392150.58461538461
609542.79116.21538461539426.484615384615
619227.79116.21538461539111.484615384615
6210571.99116.215384615391455.68461538461
6310774.49116.215384615391658.18461538461
6410392.89116.215384615391276.58461538461
659920.29116.21538461539803.984615384615
669884.911710.2107142857-1825.31071428571
6710174.511710.2107142857-1535.71071428571
6811395.411710.2107142857-314.810714285715
6910760.211710.2107142857-950.010714285714
7010570.111710.2107142857-1140.11071428571
711053611710.2107142857-1174.21071428571
729902.611710.2107142857-1807.61071428571
73888911710.2107142857-2821.21071428571
7410837.311710.2107142857-872.910714285715
7511624.111710.2107142857-86.1107142857143
761050911710.2107142857-1201.21071428571
7710984.911710.2107142857-725.310714285715
7810649.111710.2107142857-1061.11071428571
7910855.711710.2107142857-854.510714285714
8011677.411710.2107142857-32.810714285715
8110760.211710.2107142857-950.010714285714
8210046.211710.2107142857-1664.01071428571
8310772.811710.2107142857-937.410714285715
849987.711710.2107142857-1722.51071428571
858638.711710.2107142857-3071.51071428571
8611063.711710.2107142857-646.510714285714
8711855.711710.2107142857145.489285714286
8810684.511710.2107142857-1025.71071428571
8911337.411710.2107142857-372.810714285715
901047811710.2107142857-1232.21071428571
9111123.911710.2107142857-586.310714285715
9212909.311710.21071428571199.08928571428
9311339.911710.2107142857-370.310714285715
9410462.211710.2107142857-1248.01071428571
9512733.511710.21071428571023.28928571429
9610519.211710.2107142857-1191.01071428571
9710414.911710.2107142857-1295.31071428571
9812476.811710.2107142857766.589285714285
9912384.611710.2107142857674.389285714286
10012266.711710.2107142857556.489285714286
10112919.911710.21071428571209.68928571429
10211497.311710.2107142857-212.910714285715
1031214211710.2107142857431.789285714285
10413919.411710.21071428572209.18928571428
10512656.811710.2107142857946.589285714285
10612034.111710.2107142857323.889285714286
10713199.711710.21071428571489.48928571429
10810881.311710.2107142857-828.910714285715
10911301.211710.2107142857-409.010714285714
11013643.911710.21071428571933.68928571429
1111251711710.2107142857806.789285714285
11213981.111710.21071428572270.88928571429
11314275.711710.21071428572565.48928571429
1141343511710.21071428571724.78928571429
11513565.711710.21071428571855.48928571429
11616216.311710.21071428574506.08928571429
1171297011710.21071428571259.78928571429
11814079.911710.21071428572369.68928571428
1191423511710.21071428572524.78928571429
12012213.411710.2107142857503.189285714285
1211258111710.2107142857870.789285714285


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.2074474829379400.4148949658758790.79255251706206
60.0977264289168310.1954528578336620.902273571083169
70.04942325932915510.09884651865831020.950576740670845
80.04386485671919540.08772971343839080.956135143280805
90.02845906671397020.05691813342794040.97154093328603
100.01305743510663480.02611487021326970.986942564893365
110.01014339738119930.02028679476239850.9898566026188
120.005964756856004730.01192951371200950.994035243143995
130.007587661563222150.01517532312644430.992412338436778
140.005656854030835820.01131370806167160.994343145969164
150.00583373437974730.01166746875949460.994166265620253
160.003068062745255190.006136125490510380.996931937254745
170.002666371167700020.005332742335400040.9973336288323
180.001407875283043660.002815750566087310.998592124716956
190.0009342977046674680.001868595409334940.999065702295333
200.001425340731181440.002850681462362880.998574659268818
210.000943693711136940.001887387422273880.999056306288863
220.0005145904944438330.001029180988887670.999485409505556
230.0006575248570167770.001315049714033550.999342475142983
240.0003820608869509920.0007641217739019840.99961793911305
250.0003333166392494390.0006666332784988780.99966668336075
260.0003980953332790240.0007961906665580480.99960190466672
270.0003115050104267380.0006230100208534770.999688494989573
280.0002053626764334160.0004107253528668310.999794637323567
290.0001256071352304060.0002512142704608110.99987439286477
300.0001168914033268120.0002337828066536240.999883108596673
317.47341059858488e-050.0001494682119716980.999925265894014
320.000152960024263390.000305920048526780.999847039975737
339.95769657677395e-050.0001991539315354790.999900423034232
346.8130375932401e-050.0001362607518648020.999931869624068
359.57125730004929e-050.0001914251460009860.999904287427
369.51167039233458e-050.0001902334078466920.999904883296077
378.80962160372902e-050.0001761924320745800.999911903783963
380.0001274871835294610.0002549743670589210.99987251281647
390.0001808610579105130.0003617221158210260.99981913894209
400.0002613424434387350.0005226848868774690.999738657556561
410.0006588389092886030.001317677818577210.999341161090711
420.0005791054881698810.001158210976339760.99942089451183
430.001786703423608180.003573406847216360.998213296576392
440.01856695478169110.03713390956338230.98143304521831
450.01725768918447460.03451537836894910.982742310815525
460.034654312635860.069308625271720.96534568736414
470.0405407036068160.0810814072136320.959459296393184
480.03646869910570450.0729373982114090.963531300894296
490.03365109701007270.06730219402014550.966348902989927
500.0536277448442330.1072554896884660.946372255155767
510.07822082215938840.1564416443187770.921779177840612
520.1512805015519320.3025610031038640.848719498448068
530.1927489416191520.3854978832383040.807251058380848
540.2308022245265700.4616044490531410.76919777547343
550.2713467149284110.5426934298568230.728653285071589
560.3993091861985530.7986183723971070.600690813801447
570.3979187747128050.795837549425610.602081225287195
580.4370044315962290.8740088631924580.562995568403771
590.4681686924260880.9363373848521750.531831307573912
600.4237085906097680.8474171812195360.576291409390232
610.3866699267477140.7733398534954270.613330073252286
620.3659370446769370.7318740893538730.634062955323063
630.3542402547634590.7084805095269180.645759745236541
640.3265512826227110.6531025652454230.673448717377289
650.2874005806102010.5748011612204010.712599419389799
660.2789485911162780.5578971822325560.721051408883722
670.2624573936463370.5249147872926730.737542606353663
680.2341532108992940.4683064217985870.765846789100706
690.2057592557656030.4115185115312060.794240744234397
700.1833066777285070.3666133554570130.816693322271493
710.1637970709568040.3275941419136080.836202929043196
720.1664557666265810.3329115332531610.83354423337342
730.2411403561957090.4822807123914190.758859643804291
740.2177372389572510.4354744779145030.782262761042749
750.1933899249678580.3867798499357160.806610075032142
760.1802537721708740.3605075443417490.819746227829126
770.158656186677070.317312373354140.84134381332293
780.1453299382369670.2906598764739340.854670061763033
790.1294607445124230.2589214890248460.870539255487577
800.1104005066054100.2208010132108200.88959949339459
810.0994334412415140.1988668824830280.900566558758486
820.1107255597349090.2214511194698170.889274440265091
830.1020797541170690.2041595082341380.89792024588293
840.1223330476300080.2446660952600160.877666952369992
850.305615680741060.611231361482120.69438431925894
860.2941913695604130.5883827391208260.705808630439587
870.2668768463031750.5337536926063510.733123153696825
880.2804882425387910.5609764850775830.719511757461209
890.2639792936321040.5279585872642080.736020706367896
900.3065312196561290.6130624393122580.693468780343871
910.3080335193348650.6160670386697290.691966480665136
920.2974535476538140.5949070953076290.702546452346186
930.288025319422610.576050638845220.71197468057739
940.3639368785597330.7278737571194660.636063121440267
950.3360858621547890.6721717243095790.663914137845211
960.4310942824519470.8621885649038940.568905717548053
970.5830779215813560.8338441568372880.416922078418644
980.5465235222357210.9069529555285570.453476477764279
990.5092739655625360.981452068874930.490726034437464
1000.4746422581548190.9492845163096390.52535774184518
1010.431342434191860.862684868383720.56865756580814
1020.4578510555913780.9157021111827570.542148944408622
1030.4334885778485070.8669771556970130.566511422151493
1040.4292909966841880.8585819933683750.570709003315812
1050.3762464058008870.7524928116017740.623753594199113
1060.3577925058851040.7155850117702080.642207494114896
1070.3020924785385480.6041849570770960.697907521461452
1080.4802230856665450.960446171333090.519776914333455
1090.6601277459229050.679744508154190.339872254077095
1100.5881089603354140.8237820793291730.411891039664586
1110.5754182365324970.8491635269350060.424581763467503
1120.4941352130679460.9882704261358920.505864786932054
1130.4255268110417720.8510536220835440.574473188958228
1140.320449186357750.64089837271550.67955081364225
1150.2187206321049280.4374412642098560.781279367895072
1160.6575537102591550.684892579481690.342446289740845


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level280.25NOK
5% type I error level360.321428571428571NOK
10% type I error level430.383928571428571NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/10h6p61229180489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/10h6p61229180489.ps (open in new window)


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


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/4l1iw1229180489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/4l1iw1229180489.ps (open in new window)


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/7u3xq1229180489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/7u3xq1229180489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/8jnzh1229180489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/8jnzh1229180489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/9i4f61229180489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229180577r3udhyg5h12rzt3/9i4f61229180489.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