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:31:25 -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/t1229175175e2mlktok46b1shi.htm/, Retrieved Sat, 13 Dec 2008 14:33:05 +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/t1229175175e2mlktok46b1shi.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 «
6.392 0 8.686 0 9.245 0 8.183 0 7.451 0 7.989 0 8.244 0 8.843 0 9.093 0 8.247 0 9.312 0 8.341 0 7.117 0 9.636 0 9.815 0 8.611 0 8.298 0 8.715 0 8.920 0 10.086 0 9.512 0 8.991 0 10.311 0 8.895 0 7.450 0 10.084 0 9.859 0 9.100 0 8.921 0 8.503 0 8.600 0 10.394 0 9.290 0 8.742 0 10.217 0 8.639 0 8.140 0 10.779 0 10.428 0 10.349 0 10.036 0 9.492 0 10.639 0 12.055 0 10.325 0 11.817 0 11.009 0 9.997 0 9.420 0 11.959 0 12.595 0 11.891 0 10.872 0 11.836 0 11.542 0 13.094 0 11.180 0 12.036 0 12.112 0 10.875 0 9.897 0 11.672 0 12.386 0 11.406 0 9.831 0 11.025 1 10.854 1 12.253 1 11.839 1 11.669 1 11.601 1 11.178 1 9.516 1 12.103 1 12.989 1 11.610 1 10.206 1 11.356 1 11.307 1 12.649 1 11.947 1 11.714 1 12.193 1 11.269 1 9.097 1 12.640 1 13.040 1 11.687 1 11.192 1 11.392 1 11.793 1 13.933 1 12.778 1 11.810 1 13.698 1 11.957 1 10.724 1 13.939 1 13.980 1 13.807 1 12.974 1 12.510 1 12.934 1 14.908 1 13.772 1 13.013 1 14.050 1 11.817 1 11.593 1 14.466 1 13.616 1 14.734 1 13.881 1 13.528 1 13.584 1 16.170 1 13.261 1 14.742 1 15.487 1 13.155 1 12.621 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 7.03121662553579 -0.98364524613586x[t] -1.07873039016283M1[t] + 1.50284244470947M2[t] + 1.64003174777716M3[t] + 0.920821050844853M4[t] + 0.0875103539125496M5[t] + 0.392564181593832M6[t] + 0.537953484661526M7[t] + 2.07304278772922M8[t] + 0.872532090796915M9[t] + 0.78922139386461M10[t] + 1.44841069693230M11[t] + 0.0617106969323052t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.031216625535790.19937135.267100
x-0.983645246135860.191853-5.12711e-061e-06
M1-1.078730390162830.230709-4.67579e-064e-06
M21.502842444709470.2364566.355700
M31.640031747777160.2363476.939100
M40.9208210508448530.236273.89730.000178.5e-05
M50.08751035391254960.2362240.37050.7117760.355888
M60.3925641815938320.2365831.65930.0999810.049991
M70.5379534846615260.2364082.27550.0248670.012433
M82.073042787729220.2362668.774200
M90.8725320907969150.2361553.69470.0003490.000174
M100.789221393864610.2360753.34310.0011420.000571
M111.448410696932300.2360286.136600
t0.06171069693230520.00273722.544100


Multiple Linear Regression - Regression Statistics
Multiple R0.96838338094594
R-squared0.93776637249229
Adjusted R-squared0.930205277561446
F-TEST (value)124.025208130496
F-TEST (DF numerator)13
F-TEST (DF denominator)107
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.527738560787787
Sum Squared Residuals29.800354774033


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.3926.01419693230520.377803067694797
28.6868.657480464109860.0285195358901394
39.2458.856380464109860.388619535890138
48.1838.19888046410986-0.0158804641098618
57.4517.427280464109860.0237195358901383
67.9897.794044988723440.194955011276556
78.2448.001144988723450.242855011276552
88.8439.59794498872345-0.75494498872345
99.0938.459144988723450.63385501127655
108.2478.43754498872345-0.190544988723449
119.3129.158444988723450.153555011276549
128.3417.771744988723450.569255011276552
137.1176.754725295492930.36227470450707
149.6369.398008827297530.237991172702473
159.8159.596908827297530.218091172702474
168.6118.93940882729752-0.328408827297525
178.2988.167808827297530.130191172702475
188.7158.534573351911110.180426648088888
198.928.741673351911110.178326648088889
2010.08610.3384733519111-0.252473351911111
219.5129.199673351911110.312326648088889
228.9919.17807335191111-0.187073351911112
2310.3119.89897335191110.412026648088888
248.8958.512273351911110.382726648088888
257.457.49525365868059-0.045253658680591
2610.08410.1385371904852-0.0545371904851882
279.85910.3374371904852-0.478437190485188
289.19.6799371904852-0.579937190485188
298.9218.908337190485190.0126628095148117
308.5039.27510171509877-0.772101715098774
318.69.48220171509877-0.882201715098774
3210.39411.0790017150988-0.685001715098773
339.299.94020171509877-0.650201715098774
348.7429.91860171509877-1.17660171509877
3510.21710.6395017150988-0.422501715098773
368.6399.25280171509877-0.613801715098775
378.148.23578202186825-0.095782021868253
3810.77910.8790655536729-0.100065553672850
3910.42811.0779655536729-0.649965553672849
4010.34910.4204655536728-0.0714655536728501
4110.0369.648865553672850.387134446327149
429.49210.0156300782864-0.523630078286436
4310.63910.22273007828640.416269921713563
4412.05511.81953007828640.235469921713564
4510.32510.6807300782864-0.355730078286437
4611.81710.65913007828641.15786992171356
4711.00911.3800300782864-0.371030078286436
489.9979.993330078286440.00366992171356381
499.428.976310385055920.443689614944084
5011.95911.61959391686050.339406083139487
5112.59511.81849391686050.776506083139488
5211.89111.16099391686050.730006083139488
5310.87210.38939391686050.482606083139488
5411.83610.75615844147411.07984155852590
5511.54210.96325844147410.578741558525901
5613.09412.56005844147410.5339415585259
5711.1811.4212584414741-0.241258441474098
5812.03611.39965844147410.6363415585259
5912.11212.1205584414741-0.00855844147409893
6010.87510.73385844147410.141141558525902
619.8979.716838748243580.180161251756422
6211.67212.3601222800482-0.688122280048175
6312.38612.5590222800482-0.173022280048176
6411.40611.9015222800482-0.495522280048174
659.83111.1299222800482-1.29892228004818
6611.02510.51304155852590.511958441474099
6710.85410.72014155852590.133858441474099
6812.25312.3169415585259-0.0639415585259011
6911.83911.17814155852590.660858441474099
7011.66911.15654155852590.512458441474099
7111.60111.8774415585259-0.276441558525901
7211.17810.49074155852590.6872584414741
739.5169.473721865295380.0422781347046185
7412.10312.1170053971000-0.0140053970999776
7512.98912.31590539710000.673094602900022
7611.6111.6584053971000-0.0484053970999786
7710.20610.8868053971000-0.680805397099979
7811.35611.25356992171360.102430078286435
7911.30711.4606699217136-0.153669921713563
8012.64913.0574699217136-0.408469921713564
8111.94711.91866992171360.0283300782864355
8211.71411.8970699217136-0.183069921713564
8312.19312.6179699217136-0.424969921713564
8411.26911.23126992171360.0377300782864366
859.09710.2142502284830-1.11725022848305
8612.6412.8575337602876-0.217533760287640
8713.0413.0564337602876-0.0164337602876419
8811.68712.3989337602876-0.711933760287642
8911.19211.6273337602876-0.43533376028764
9011.39211.9940982849012-0.602098284901227
9111.79312.2011982849012-0.408198284901227
9213.93313.79799828490120.135001715098774
9312.77812.65919828490120.118801715098775
9411.8112.6375982849012-0.827598284901226
9513.69813.35849828490120.339501715098774
9611.95711.9717982849012-0.0147982849012256
9710.72410.9547785916707-0.230778591670706
9813.93913.59806212347530.340937876524697
9913.9813.79696212347530.183037876524697
10013.80713.13946212347530.667537876524698
10112.97412.36786212347530.606137876524697
10212.5112.7346266480889-0.224626648088889
10312.93412.9417266480889-0.0077266480888893
10414.90814.53852664808890.369473351911111
10513.77213.39972664808890.372273351911112
10613.01313.3781266480889-0.365126648088889
10714.0514.0990266480889-0.0490266480888875
10811.81712.7123266480889-0.895326648088889
10911.59311.6953069548584-0.102306954858368
11014.46614.33859048666300.127409513337034
11113.61614.5374904866630-0.921490486662966
11214.73413.87999048666300.854009513337034
11313.88113.10839048666300.772609513337034
11413.52813.47515501127660.0528449887234491
11513.58413.6822550112766-0.0982550112765508
11616.1715.27905501127660.89094498872345
11713.26114.1402550112766-0.879255011276552
11814.74214.11865501127660.62334498872345
11915.48714.83955501127660.647444988723448
12013.15513.4528550112766-0.297855011276552
12112.62112.43583531804600.185164681953969


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.03863602752185440.07727205504370880.961363972478146
180.00973720400313380.01947440800626760.990262795996866
190.002244401575374950.00448880315074990.997755598424625
200.005810261455360320.01162052291072060.99418973854464
210.003696153332847240.007392306665694470.996303846667153
220.001166064026389080.002332128052778170.99883393597361
230.0005785079063040240.001157015812608050.999421492093696
240.0002439447356220320.0004878894712440650.999756055264378
250.0002513102504998360.0005026205009996720.9997486897495
268.69280632506669e-050.0001738561265013340.99991307193675
270.0004376922850041550.000875384570008310.999562307714996
280.0002181278765464680.0004362557530929360.999781872123453
299.30964769848536e-050.0001861929539697070.999906903523015
300.0004821890223385550.000964378044677110.999517810977661
310.001929740108524800.003859480217049590.998070259891475
320.001222118034335200.002444236068670400.998777881965665
330.002952457798313930.005904915596627860.997047542201686
340.005314308169851140.01062861633970230.99468569183015
350.003566669264900550.007133338529801090.9964333307351
360.004752022774631820.009504045549263640.995247977225368
370.003382114662287950.00676422932457590.996617885337712
380.002908941170409350.00581788234081870.99709105882959
390.002079575060666260.004159150121332520.997920424939334
400.004504518455426270.009009036910852530.995495481544574
410.00883690448454830.01767380896909660.991163095515452
420.006829025151523330.01365805030304670.993170974848477
430.01720636987104030.03441273974208060.98279363012896
440.04579065914117950.0915813182823590.95420934085882
450.03544150482884350.0708830096576870.964558495171157
460.2929273120423250.585854624084650.707072687957675
470.2598854096216140.5197708192432280.740114590378386
480.2133866282505680.4267732565011350.786613371749432
490.2037565836470220.4075131672940450.796243416352978
500.1871132671454990.3742265342909970.812886732854502
510.2603225769834350.5206451539668690.739677423016565
520.3297545374503120.6595090749006240.670245462549688
530.3134590047226290.6269180094452590.68654099527737
540.4934728775887710.9869457551775410.506527122411229
550.5043852003108150.991229599378370.495614799689185
560.5212918467319770.9574163065360470.478708153268023
570.4725601473652060.9451202947304120.527439852634794
580.513897151668780.972205696662440.48610284833122
590.4623321840526750.924664368105350.537667815947325
600.4403465468163520.8806930936327050.559653453183648
610.4752012698149970.9504025396299940.524798730185003
620.4836056972831980.9672113945663960.516394302716802
630.4752142619320660.9504285238641310.524785738067934
640.456626105140370.913252210280740.54337389485963
650.5701019601548940.8597960796902120.429898039845106
660.5603037121750030.8793925756499940.439696287824997
670.5225507003949490.9548985992101020.477449299605051
680.467567477519280.935134955038560.53243252248072
690.4924462557079820.9848925114159640.507553744292018
700.5088348285985410.9823303428029190.491165171401459
710.47229026735280.94458053470560.5277097326472
720.574265985438610.851468029122780.42573401456139
730.5765912556264090.8468174887471830.423408744373591
740.5216289593980520.9567420812038960.478371040601948
750.6433405495152390.7133189009695220.356659450484761
760.5852526150879820.8294947698240350.414747384912018
770.6207420078408320.7585159843183350.379257992159168
780.6189278798279480.7621442403441040.381072120172052
790.583538450360370.832923099279260.41646154963963
800.5608485381932990.8783029236134020.439151461806701
810.5324721761561840.9350556476876320.467527823843816
820.4971109471640350.994221894328070.502889052835965
830.4546004931313340.9092009862626680.545399506868666
840.4979308471029470.9958616942058940.502069152897053
850.5776648799172160.8446702401655670.422335120082784
860.5117417956746740.9765164086506520.488258204325326
870.5020653295810370.9958693408379260.497934670418963
880.6498199187021420.7003601625957170.350180081297858
890.7115607181244850.576878563751030.288439281875515
900.6778792598493840.6442414803012320.322120740150616
910.6175542813786790.7648914372426420.382445718621321
920.5736904113744760.8526191772510480.426309588625524
930.5357825563265650.928434887346870.464217443673435
940.6230291904857950.7539416190284110.376970809514205
950.5493346019495570.9013307961008860.450665398050443
960.5553749950049390.8892500099901220.444625004995061
970.4637527016464090.9275054032928170.536247298353591
980.3913438457231130.7826876914462270.608656154276887
990.5900822716562320.8198354566875360.409917728343768
1000.5029205821414670.9941588357170670.497079417858533
1010.4035912831645680.8071825663291370.596408716835432
1020.2869312200715520.5738624401431050.713068779928448
1030.1997649575647650.3995299151295310.800235042435235
1040.1190805997411760.2381611994823520.880919400258824


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level200.227272727272727NOK
5% type I error level260.295454545454545NOK
10% type I error level290.329545454545455NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/10gz641229175079.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/10gz641229175079.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/14q531229175079.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/14q531229175079.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/26zso1229175079.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/26zso1229175079.ps (open in new window)


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


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/66mcv1229175079.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229175175e2mlktok46b1shi/66mcv1229175079.ps (open in new window)


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


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


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