Home » date » 2010 » Dec » 22 »

Paper - Multiple Regression Model 7

*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: Wed, 22 Dec 2010 08:59:12 +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/22/t1293008334wq2r87zpf4ig2si.htm/, Retrieved Wed, 22 Dec 2010 09:58:54 +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/22/t1293008334wq2r87zpf4ig2si.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 «
10.81 -0,2643 0 0 24563400 24.45 9.12 -0,2643 0 0 14163200 23.62 11.03 -0,2643 0 0 18184800 21.90 12.74 -0,1918 0 0 20810300 27.12 9.98 -0,1918 0 0 12843000 27.70 11.62 -0,1918 0 0 13866700 29.23 9.40 -0,2246 0 0 15119200 26.50 9.27 -0,2246 0 0 8301600 22.84 7.76 -0,2246 0 0 14039600 20.49 8.78 0,3654 0 0 12139700 23.28 10.65 0,3654 0 0 9649000 25.71 10.95 0,3654 0 0 8513600 26.52 12.36 0,0447 0 0 15278600 25.51 10.85 0,0447 0 0 15590900 23.36 11.84 0,0447 0 0 9691100 24.15 12.14 -0,0312 0 0 10882700 20.92 11.65 -0,0312 0 0 10294800 20.38 8.86 -0,0312 0 0 16031900 21.90 7.63 -0,0048 0 0 13683600 19.21 7.38 -0,0048 0 0 8677200 19.65 7.25 -0,0048 0 0 9874100 17.51 8.03 0,0705 0 0 10725500 21.41 7.75 0,0705 0 0 8348400 23.09 7.16 0,0705 0 0 8046200 20.70 7.18 -0,0134 0 0 10862300 19.00 7.51 -0,0134 0 0 8100300 19.04 7.07 -0,0134 0 0 7287500 19.45 7.11 0,0812 0 0 14002500 20.54 8.98 0,0812 0 0 19037900 19.77 9.53 0,0812 0 0 10774600 20.60 10.54 0,1885 0 0 8960600 21.21 11.31 0,1885 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 time13 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Apple[t] = -135.571134934426 -37.2940667049397Omzetgroei[t] + 82.8825039379301Omzetgroei_iPhone[t] + 94.3952766372327Omzetgroei_iPad[t] -4.24484261111306e-07Volume[t] + 5.42889693785601Microsoft[t] + 1.55788173789371t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-135.57113493442610.076876-13.453700
Omzetgroei-37.29406670493975.857235-6.367200
Omzetgroei_iPhone82.88250393793019.6560028.583500
Omzetgroei_iPad94.395276637232711.312398.344400
Volume-4.24484261111306e-070-3.20620.0017610.000881
Microsoft5.428896937856010.43236712.556200
t1.557881737893710.06093625.565900


Multiple Linear Regression - Regression Statistics
Multiple R0.984175061462104
R-squared0.968600551603937
Adjusted R-squared0.966887854418697
F-TEST (value)565.541042486335
F-TEST (DF numerator)6
F-TEST (DF denominator)110
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.825177056523
Sum Squared Residuals21024.9072708631


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110.81-1.8466779352192212.6566779352192
29.12-0.3800594433360559.50005944333605
311.03-9.8669863430420.89698634304
412.7416.2114341468063-3.47143414680626
59.9824.3000695622086-14.3200695622086
611.6233.7296190769224-22.1096190769224
79.421.1581910253492-11.7581910253492
89.275.74027386924243.52972613075760
97.76-7.8954428870822115.6554428870822
108.78-12.387960400799221.1679604007992
1110.653.419403845234537.23059615476547
1210.959.856651532857381.09334846714262
1312.3615.0199185293727-2.65991852937268
1410.854.773105416130896.0768945838691
1511.8413.1241879786353-1.28418797863533
1612.14-0.52846317538117112.6684631753812
1711.65-1.6526314868223813.3026314868224
188.865.721864942190793.13813505780921
197.63-7.3117330533908914.9417330533909
207.38-1.23999865801298.6199986580129
217.25-11.808021579255219.0580215792552
228.037.752909093484870.277090906515132
237.7519.4403792240644-11.6903792240644
247.168.15147642419003-0.991476424190035
257.182.413815436557434.76618456344257
267.515.361278581154792.14872141884521
277.079.49002887100075-2.42002887100075
287.1110.5869777475078-3.47697774750779
298.985.82716079485253.1528392051475
309.5315.3986677860078-5.86866778600776
3110.5417.0365377482095-6.49653774820952
3211.3119.5870103737277-8.27701037372772
3310.3625.9698675883417-15.6098675883417
3411.4413.7406253192194-2.30062531921941
3510.4514.1530836966933-3.70308369669331
3610.6923.1368037282697-12.4468037282697
3711.2826.2303743534748-14.9503743534748
3811.9624.6963341445026-12.7363341445026
3913.5215.6315737801965-2.1115737801965
4012.8923.2421146563013-10.3521146563013
4114.0327.8867405032036-13.8567405032036
4216.2737.5734376135357-21.3034376135357
4316.1735.3512234844053-19.1812234844053
4417.2533.4727940591584-16.2227940591584
4519.3836.4844624980662-17.1044624980662
4626.219.3164961526466.883503847354
4733.5328.16042204549555.36957795450454
4832.231.434217053020.76578294698
4938.4522.770387775453315.6796122245467
5044.8622.352324391795522.5076756082045
5141.6726.106803679113115.5631963208869
5236.0627.50829111670198.55170888329805
5339.7636.78711090911362.97288909088642
5436.8135.10232606855051.70767393144954
5542.6547.2903618455625-4.64036184556252
5646.8959.5843350884178-12.6943350884178
5753.6150.16310431317353.44689568682654
5857.5943.652195278759413.9378047212406
5967.8259.41016343048818.4098365695119
6071.8953.630132970880718.2598670291193
6175.5169.03585640457756.47414359542254
6268.4965.97253051678982.51746948321016
6362.7269.370004997769-6.65000499776898
6470.3958.717197456055611.6728025439444
6559.7758.23848280886551.53151719113453
6657.2761.8225710069717-4.55257100697166
6767.9663.37912617227054.58087382772945
6867.8575.3805654033086-7.53056540330859
6976.9883.6188873036833-6.63888730368326
7081.0898.3356890132253-17.2556890132253
7191.66103.283791827428-11.6237918274284
7284.84104.389944081900-19.5499440818997
7385.73104.268435379488-18.5384353794884
7484.61102.388313691616-17.778313691616
7592.91102.725535484698-9.81553548469795
7699.8113.225786787996-13.4257867879957
77121.19116.8823705615924.30762943840814
78122.04130.111062870974-8.07106287097412
79131.76132.467610116814-0.707610116813713
80138.48135.1876409306153.29235906938450
81153.47139.93644838422713.5335516157732
82189.95184.6382338362215.31176616377888
83182.22166.58301306902515.6369869309755
84198.08184.62207474311313.4579252568868
85135.36160.058171638852-24.6981716388521
86125.02141.143819410509-16.1238194105086
87143.5150.621058883214-7.12105888321359
88173.95147.50175092720926.4482490727914
89188.75151.19918379494037.5508162050602
90167.44147.88456595766419.5554340423359
91158.95158.3084550751030.64154492489666
92169.53172.613448181149-3.08344818114924
93113.66162.40727701238-48.7472770123799
94107.59104.0630498115043.52695018849571
9592.67104.729954864742-12.0599548647424
9685.35107.006126630859-21.6561266308588
9790.1396.5042308956197-6.37423089561974
9889.3196.2510887168013-6.94108871680126
99105.12110.034459121488-4.91445912148766
100125.83130.397175013295-4.56717501329474
101135.81137.351886988535-1.54188698853532
102142.43152.537077115678-10.1070771156777
103163.39143.60954149853919.7804585014609
104168.21153.55708128876214.652918711238
105185.35159.27931108019126.0706889198091
106188.5181.5320718541966.96792814580446
107199.91195.3907558718014.51924412819882
108210.73201.2854510509029.44454894909804
109192.06193.188295120410-1.12829512041048
110204.62202.1524216215022.46757837849789
111235207.72971554846527.2702844515350
112261.09278.580727939982-17.4907279399820
113256.88250.4405668215166.4394331784842
114251.53239.36340687608212.1665931239181
115257.25263.808754455495-6.55875445549526
116243.1258.209884478188-15.1098844781881
117283.75263.10696701729520.6430329827046


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.001837442510068780.003674885020137560.998162557489931
110.0002217017760742900.0004434035521485810.999778298223926
122.33451928969247e-054.66903857938493e-050.999976654807103
133.57336492022593e-067.14672984045185e-060.99999642663508
143.06394047470637e-076.12788094941273e-070.999999693605953
154.99561525194126e-089.99123050388253e-080.999999950043847
161.14323401640995e-082.2864680328199e-080.99999998856766
171.29516620423317e-092.59033240846633e-090.999999998704834
181.491772056436e-092.983544112872e-090.999999998508228
196.20292343774259e-101.24058468754852e-090.999999999379708
201.52498801236632e-103.04997602473264e-100.999999999847501
213.0768729007166e-116.1537458014332e-110.999999999969231
225.92714862149371e-121.18542972429874e-110.999999999994073
231.24953074855443e-122.49906149710886e-120.99999999999875
242.04536285972470e-134.09072571944941e-130.999999999999795
253.06688200595873e-146.13376401191747e-140.99999999999997
264.02178632379643e-158.04357264759286e-150.999999999999996
275.12363086958004e-161.02472617391601e-151
288.25869525370473e-171.65173905074095e-161
291.31391125362607e-172.62782250725215e-171
302.64437799253747e-185.28875598507493e-181
318.21112760528427e-191.64222552105685e-181
323.93703941330233e-197.87407882660466e-191
334.98655682266382e-209.97311364532763e-201
341.13171744512182e-202.26343489024365e-201
351.57490029718757e-213.14980059437513e-211
361.75390705503886e-223.50781411007772e-221
371.88841144413662e-233.77682288827324e-231
383.87563321155669e-247.75126642311337e-241
391.7293354905297e-243.4586709810594e-241
402.69867380319165e-255.3973476063833e-251
412.15078301058695e-254.30156602117390e-251
421.41470135371147e-252.82940270742293e-251
433.15113342762535e-266.3022668552507e-261
443.51971520483203e-267.03943040966405e-261
451.69748712789882e-253.39497425579764e-251
467.60230415310389e-251.52046083062078e-241
472.74856515629569e-235.49713031259138e-231
481.05799555590122e-222.11599111180244e-221
492.20560275968689e-234.41120551937378e-231
503.81051658080217e-217.62103316160435e-211
512.59551611897551e-175.19103223795103e-171
527.79378756131742e-181.55875751226348e-171
531.38105003906226e-162.76210007812453e-161
545.58918046771283e-161.11783609354257e-151
553.89120820240851e-147.78241640481702e-140.999999999999961
563.23708955538501e-126.47417911077001e-120.999999999996763
571.49382775109723e-102.98765550219446e-100.999999999850617
589.03685216239956e-101.80737043247991e-090.999999999096315
595.63542187985485e-081.12708437597097e-070.999999943645781
609.28718361348122e-061.85743672269624e-050.999990712816387
611.35288877163936e-052.70577754327873e-050.999986471112284
621.19435497790641e-052.38870995581281e-050.99998805645022
637.19605565097034e-061.43921113019407e-050.99999280394435
641.17923595068115e-052.3584719013623e-050.999988207640493
659.34631721159982e-061.86926344231996e-050.999990653682788
665.54126474165325e-061.10825294833065e-050.999994458735258
671.24272568588675e-052.48545137177350e-050.999987572743141
681.06868432795311e-052.13736865590622e-050.99998931315672
691.22541230389465e-052.4508246077893e-050.999987745876961
708.78298240488041e-061.75659648097608e-050.999991217017595
718.91214064254e-061.782428128508e-050.999991087859357
725.50865263933336e-061.10173052786667e-050.99999449134736
736.98837987428219e-061.39767597485644e-050.999993011620126
745.39700697586155e-061.07940139517231e-050.999994602993024
755.04801482752983e-061.00960296550597e-050.999994951985173
766.62599306604586e-061.32519861320917e-050.999993374006934
772.92018662947762e-055.84037325895524e-050.999970798133705
782.87037939978037e-055.74075879956074e-050.999971296206002
791.65305372166246e-053.30610744332492e-050.999983469462783
801.05129880064772e-052.10259760129543e-050.999989487011994
811.10570455164677e-052.21140910329355e-050.999988942954483
821.38435489755978e-052.76870979511957e-050.999986156451024
839.68483644631961e-061.93696728926392e-050.999990315163554
841.24526463326877e-052.49052926653753e-050.999987547353667
850.00136463285528960.00272926571057920.99863536714471
860.00302914210465810.00605828420931620.996970857895342
870.002713377545161370.005426755090322750.997286622454839
880.005974074068371670.01194814813674330.994025925931628
890.05668246728876570.1133649345775310.943317532711234
900.1142840518189240.2285681036378480.885715948181076
910.2320543786454320.4641087572908630.767945621354568
920.8682908337551970.2634183324896060.131709166244803
930.967996089036220.06400782192756090.0320039109637805
940.9648127836525170.0703744326949650.0351872163474825
950.9507864458481010.09842710830379740.0492135541518987
960.9380054638796720.1239890722406570.0619945361203283
970.9048982280578250.1902035438843510.0951017719421755
980.873262216478380.253475567043240.12673778352162
990.850687715865790.2986245682684190.149312284134210
1000.7970501913244090.4058996173511820.202949808675591
1010.8040099035766640.3919801928466720.195990096423336
1020.7663505292094960.4672989415810080.233649470790504
1030.7434220094202120.5131559811595770.256577990579788
1040.6520443947414620.6959112105170750.347955605258538
1050.5913963260106980.8172073479786040.408603673989302
1060.5097712159257270.9804575681485460.490228784074273
1070.4094379858653440.8188759717306890.590562014134655


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level780.795918367346939NOK
5% type I error level790.806122448979592NOK
10% type I error level820.836734693877551NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/10ketx1293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/10ketx1293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/1dce31293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/1dce31293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/25md61293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/25md61293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/35md61293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/35md61293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/45md61293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/45md61293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/5gdu91293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/5gdu91293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/6gdu91293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/6gdu91293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/7r4cc1293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/7r4cc1293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/8r4cc1293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/8r4cc1293008334.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/9r4cc1293008334.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/22/t1293008334wq2r87zpf4ig2si/9r4cc1293008334.ps (open in new window)


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