Home » date » 2010 » Dec » 01 »

*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, 01 Dec 2010 11:20:41 +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/01/t12912023761ayg83hp2n6dw8l.htm/, Retrieved Wed, 01 Dec 2010 12:19:36 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l.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 «
4 4 3 3 2 2 2 2 2 4 2 4 2 3 1 1 2 3 3 2 2 1 2 2 5 4 4 3 4 3 2 2 4 4 4 2 2 1 1 2 4 4 4 4 2 3 3 3 4 4 4 4 4 4 2 2 1 1 2 3 4 4 2 3 3 2 3 3 4 4 3 4 1 2 2 2 2 3 2 2 1 3 1 2 4 3 4 3 4 3 4 4 1 2 2 2 4 4 4 3 5 4 4 4 4 4 4 3 4 4 3 3 4 4 3 3 2 2 2 2 2 2 2 2 4 4 2 4 4 3 4 3 2 2 1 3 3 2 4 2 4 4 4 4 3 3 1 3 2 2 2 2 4 4 3 3 4 4 4 4 3 3 3 4 1 1 1 2 2 2 3 1 4 2 2 2 2 2 1 3 3 4 3 3 4 3 4 4 1 2 1 2 3 2 4 3 4 4 4 4 1 1 1 2 4 5 4 2 3 2 4 3 1 3 2 2 1 4 4 4 4 4 3 3 4 3 2 3 4 4 4 4 2 2 2 4 4 3 4 4 2 2 2 2 4 4 4 4 5 5 5 4 3 3 4 4 2 1 1 2 4 3 3 3 4 4 4 3 2 2 1 2 3 3 3 4 1 1 1 1 4 3 4 3 4 2 4 3 4 3 2 2 4 4 4 2 3 3 3 3 4 4 4 3 3 4 4 3 3 3 4 3 2 2 1 3 1 1 2 2 2 2 1 2 4 3 3 3 3 4 3 3 5 1 3 2 1 1 1 2 3 3 3 3 2 2 2 2 3 2 3 3 4 3 4 3 3 2 2 2 3 2 2 3 4 3 3 3 4 4 4 4 4 4 4 4 2 2 4 3 2 2 2 2 1 1 1 1 1 2 2 2 4 3 4 3 2 3 3 3 4 4 4 5 3 4 4 4 5 4 3 5 1 NA 2 2 1 1 1 1 2 3 2 3 4 2 2 3 4 3 4 4 3 3 2 2 4 2 1 2 4 3 2 3 5 2 4 4 1 2 2 2 4 3 3 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Q4 [t] = + 0.865045701430835 + 0.145400006160318Q1[t] + 0.252561146567979Q2[t] + 0.220272402114639Q3[t] -0.0776944496009527M1[t] -0.135576717001389M2[t] + 0.0716598829398656M3[t] + 0.0976981103730005M4[t] + 0.278051810260123M5[t] + 0.0567419658771181M6[t] + 0.133278071817606M7[t] + 0.0873192329729293M8[t] + 0.12122700224052M9[t] + 0.207612182563193M10[t] + 0.230802626594899M11[t] + 0.00207493155891959t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.8650457014308350.2615343.30760.00126e-04
Q10.1454000061603180.0675852.15140.033190.016595
Q20.2525611465679790.0768263.28740.0012820.000641
Q30.2202724021146390.0721133.05460.0027060.001353
M1-0.07769444960095270.258216-0.30090.7639510.381976
M2-0.1355767170013890.259051-0.52340.6015640.300782
M30.07165988293986560.2569190.27890.7807240.390362
M40.09769811037300050.2590710.37710.7066720.353336
M50.2780518102601230.2559521.08630.2792210.139611
M60.05674196587711810.2558130.22180.824790.412395
M70.1332780718176060.257550.51750.6056460.302823
M80.08731923297292930.2651270.32930.7423910.371196
M90.121227002240520.2592430.46760.6407940.320397
M100.2076121825631930.2619860.79250.4294560.214728
M110.2308026265948990.2564840.89990.3697560.184878
t0.002074931558919590.0011861.750.0823330.041166


Multiple Linear Regression - Regression Statistics
Multiple R0.701482221157589
R-squared0.492077306600185
Adjusted R-squared0.436868318187161
F-TEST (value)8.91299262574619
F-TEST (DF numerator)15
F-TEST (DF denominator)138
p-value3.71924713249427e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.646445212137204
Sum Squared Residuals57.6690148967258


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.0420880006459-0.042088000645902
221.970085957233160.0299140427668448
342.684519781869291.31548021813071
412.23979939217872-1.23979939217872
522.86277282785404-0.862772827854045
621.918143219779360.0818567802206368
733.63118251969294-0.631182519692938
822.74879265544961-0.748792655449606
923.47788130707337-1.47788130707337
1021.857040760586480.142959239413523
1143.591606794545590.408393205454409
1232.599245538506360.400754461493641
1343.287259581467580.712740418532421
1422.79090744139678-0.790907441396783
1531.806335514712071.19366448528793
1633.02833213188901-0.0283321318890123
1732.780510866153420.219489133846581
1843.211798252625610.788201747374392
1922.12881457639347-0.128814576393467
2022.48289182183601-0.482891821836005
2122.15320211438756-0.153202114387559
2233.33867945109402-0.338679451094022
2343.363944826684650.636055173315352
2422.00591116237046-0.0059111623704582
2533.31215876017461-0.312158760174614
2643.401751430493410.598248569506586
2733.46566295583327-0.465662955833271
2833.27350371271069-0.273503712710687
2933.45593234415673-0.455932344156728
3022.22050272376141-0.220502723761412
3122.29911376126082-0.299113761260819
3243.051152159431660.948847840568345
3333.27511851791946-0.275118517919465
3432.159400264568530.840599735431475
3522.99088285266339-0.990882852663387
3643.412677456923680.587322543076318
3732.278279579809440.721720420190565
3822.04478349335426-0.0447834933542608
3933.27028973242567-0.270289732425667
4043.518675293532360.481324706467639
4143.082870370135470.917129629864532
4221.627168347625510.372831652374489
4312.54428534208249-1.54428534208249
4422.57092904500273-0.570929045002733
4532.095839331393970.904160668606032
4633.27536654680111-0.275366546801114
4743.413743184098720.586256815901282
4821.835437117669890.164562882330111
4932.711434818292410.288565181707591
5043.306149781747170.693850218252833
5121.660760648718540.339239351281465
5223.79613561880737-1.79613561880737
5333.07548080438916-0.0754808043891635
5422.37746222158314-0.377462221583143
5543.149179209879810.850820790120193
5633.32122291896036-0.321222918960364
5732.884372071104260.115627928895743
5843.665938133783110.334061866216893
5942.454736399687861.54526360031214
6043.209914667769770.790085332230226
6122.15038918660985-0.150389186609848
6243.33104896045420.668951039545798
6344.15859404679731-0.158594046797312
6443.170512498218140.829487501781865
6522.04160162402398-0.0416016240239844
6633.05883382088577-0.0588338208857702
6733.61027840706780-0.610278407067795
6822.10965498798153-0.109654987981528
6942.984143645765611.01585635423439
7011.83613664796134-0.836136647961335
7133.46354154151279-0.463541541512788
7232.982252699908830.0177473000911697
7322.7186495242055-0.718649524205497
7423.35594813916124-1.35594813916124
7532.947026115818480.0529738841815237
7633.59337282965347-0.593372829653466
7733.63040145493919-0.63040145493919
7833.15860539554713-0.158605395547127
7932.178438073974320.82156192602568
8021.956865416074910.0431345839250939
8122.17053686751507-0.170536867515074
8233.24290294251456-0.242902942514559
8333.37532945851284-0.375329458512845
8422.67971833609357-0.679718336093565
8521.581953989180980.418046010819017
8632.762613763025340.237386236974663
8722.35369173968258-0.353691739682576
8832.747477306949590.252522693050413
8933.54813949323856-0.548139493238565
9022.49039862345691-0.490398623456905
9132.569009660956310.430990339043687
9233.14335930851349-0.143359308513491
9343.652175558022620.347824441977381
9443.740635669904210.259364330095788
9532.969978740038240.0300212599617556
9622.30070624077299-0.300706240772987
9711.60685316788802-0.606853167888018
9822.02387938072912-0.0238793807291185
9933.36249688150750-0.362496881507503
10032.879537626064280.120462373935717
10153.825599818513581.17440018148642
10243.460964899529180.539035100470824
10353.610103547234581.38989645276542
10422.82237407220085-0.822374072200847
10510.7816288854933540.218371114506646
10632.845133126836640.154866873163363
10732.309511382597910.690488617402086
10844.64794705416629-0.647947054166285
10922.26470617580247-0.264706175802468
11021.946851255985260.0531487440147399
11132.308348078798930.691651921201068
11244.46863188137442-0.468631881374425
11322.15843053571391-0.158430535713911
11432.984480426645340.0155195733546601
11532.193157665927560.80684233407244
11643.411173903116050.588826096883946
11744.55396691763241-0.553966917632411
11822.81569940290891-0.815699402908907
11934.18901055514463-1.18901055514463
12021.893118634987960.106881365012041
12132.455544853989380.544455146010622
12244.64866167791832-0.64866167791832
12321.440408397913630.559591602086372
12443.655125773813010.344874226186990
12544.0217350006894-0.0217350006893962
12622.51450189848833-0.514501898488332
12733.69089039331721-0.690890393317214
12832.635805990618170.364194009381829
12931.960632541496511.03936745850349
13032.400053777386660.599946222613336
13143.961348587283690.0386514127163119
13233.29978425885206-0.299784258852059
13321.641938075738840.358061924261162
13433.21692201551397-0.216922015513970
13532.481401613502770.518598386497229
13632.647736208066710.352263791933295
13744.20822889312798-0.208228893127981
13832.614273473149690.385726526850311
13943.242956023341630.757043976658369
14043.751772272850760.248227727149241
14144.58767123816437-0.587671238164373
14233.64522535820834-0.645225358208338
14333.79826410832942-0.798264108329423
14421.470083443719410.529916556280588
14533.65064254687464-0.650642546874641
14611.47818763321775-0.478187633217751
14721.522495499781040.477504500218962
14843.925196533341720.074803466658281
14944.0877280656747-0.0877280656746981
15033.16633910317411-0.166339103174106
15132.488127604163310.511872395836695
15244.68560434803224-0.685604348032241
15322.67012453691537-0.670124536915373
15443.71600214662880.283997853371202
1553NANA
1563NANA


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
190.6619287447148340.6761425105703320.338071255285166
200.5318880071747010.9362239856505990.468111992825299
210.556761726947910.886476546104180.44323827305209
220.4713865354953190.9427730709906380.528613464504681
230.3682479783112050.736495956622410.631752021688795
240.3937281394934270.7874562789868540.606271860506573
250.458793277370910.917586554741820.54120672262909
260.4706584788550720.9413169577101440.529341521144928
270.768737012821310.4625259743573790.231262987178690
280.7164158238399520.5671683523200960.283584176160048
290.6602665950498180.6794668099003640.339733404950182
300.6685651245154940.6628697509690120.331434875484506
310.6003141661855120.7993716676289750.399685833814488
320.7220683605453920.5558632789092160.277931639454608
330.6831018733685740.6337962532628520.316898126631426
340.6483971632369290.7032056735261420.351602836763071
350.8007364295113350.3985271409773290.199263570488665
360.7614386564157320.4771226871685360.238561343584268
370.7234908080027260.5530183839945480.276509191997274
380.6663120525108070.6673758949783870.333687947489193
390.7258916797989010.5482166404021980.274108320201099
400.757690646761320.4846187064773590.242309353238680
410.7905610369775050.4188779260449910.209438963022495
420.7515556242603490.4968887514793020.248444375739651
430.8766683044871780.2466633910256450.123331695512822
440.8645930036801230.2708139926397550.135406996319877
450.8934813534945780.2130372930108430.106518646505422
460.8792460369666960.2415079260666080.120753963033304
470.8581803327334360.2836393345331270.141819667266564
480.8448240833244630.3103518333510730.155175916675537
490.8108780924982140.3782438150035720.189121907501786
500.8091182982744720.3817634034510560.190881701725528
510.7894473977475150.4211052045049710.210552602252485
520.9364733445328130.1270533109343740.0635266554671868
530.9180384018268020.1639231963463960.081961598173198
540.905594280274290.1888114394514210.0944057197257105
550.9498869425715120.1002261148569770.0501130574284885
560.9396106323980130.1207787352039740.0603893676019871
570.9224027121396810.1551945757206380.0775972878603188
580.9043002315111050.191399536977790.095699768488895
590.9604096899956480.07918062000870360.0395903100043518
600.964527765546550.07094446890689820.0354722344534491
610.960844886903360.07831022619328120.0391551130966406
620.9604030110647630.07919397787047330.0395969889352367
630.9536336707266240.09273265854675260.0463663292733763
640.9688676270244770.06226474595104590.0311323729755230
650.9607023352954480.07859532940910460.0392976647045523
660.9497643685294250.100471262941150.050235631470575
670.9502473565575020.09950528688499620.0497526434424981
680.936951644068250.1260967118634990.0630483559317495
690.9571809522827030.08563809543459480.0428190477172974
700.9703611081310880.05927778373782440.0296388918689122
710.970523545834920.05895290833015940.0294764541650797
720.9636376492343990.07272470153120220.0363623507656011
730.9688681310061790.06226373798764230.0311318689938212
740.990879071170930.01824185765813960.00912092882906981
750.9882942246976560.02341155060468720.0117057753023436
760.9911029147920740.01779417041585150.00889708520792575
770.992018265296690.01596346940662090.00798173470331045
780.9889056407012260.02218871859754750.0110943592987738
790.990790686872660.01841862625468130.00920931312734064
800.9871268279717410.02574634405651710.0128731720282586
810.9828220378005770.03435592439884550.0171779621994227
820.9790315445825820.04193691083483680.0209684554174184
830.9754518394529040.04909632109419230.0245481605470961
840.9763681021561040.04726379568779250.0236318978438962
850.9745653305658510.0508693388682980.025434669434149
860.966230153444890.06753969311022190.0337698465551110
870.9591470679002530.08170586419949310.0408529320997466
880.9512896125013690.09742077499726250.0487103874986313
890.9591516590231190.08169668195376220.0408483409768811
900.9564600066988450.08707998660231020.0435399933011551
910.9485320507660150.102935898467970.051467949233985
920.944607914294220.1107841714115600.0553920857057798
930.9305402693647540.1389194612704920.0694597306352459
940.9138480438967090.1723039122065820.0861519561032911
950.9010329323029570.1979341353940870.0989670676970435
960.8809774694134420.2380450611731160.119022530586558
970.872623508825350.2547529823493000.127376491174650
980.8427812565939490.3144374868121030.157218743406051
990.8160329388371120.3679341223257760.183967061162888
1000.7879615218249530.4240769563500950.212038478175047
1010.8333134127174270.3333731745651470.166686587282573
1020.819992635937240.3600147281255190.180007364062760
1030.8953653437434580.2092693125130840.104634656256542
1040.913880959291910.1722380814161800.0861190407080898
1050.8909152162744050.2181695674511910.109084783725595
1060.8664528169156750.2670943661686500.133547183084325
1070.8982396692492820.2035206615014360.101760330750718
1080.9067949648828480.1864100702343040.0932050351171518
1090.9015131080498710.1969737839002570.0984868919501287
1100.873255562584330.2534888748313390.126744437415670
1110.854359595846410.291280808307180.14564040415359
1120.850027044277330.2999459114453390.149972955722669
1130.8131732495589970.3736535008820070.186826750441003
1140.7676903251514920.4646193496970150.232309674848508
1150.744620499346640.5107590013067190.255379500653360
1160.7933969628890830.4132060742218340.206603037110917
1170.797639370867610.4047212582647790.202360629132389
1180.7875745766222310.4248508467555380.212425423377769
1190.8314597403358920.3370805193282150.168540259664108
1200.7802467346047940.4395065307904130.219753265395206
1210.7746186208764810.4507627582470380.225381379123519
1220.7298925699620160.5402148600759680.270107430037984
1230.6699755670334520.6600488659330970.330024432966548
1240.5952584218118090.8094831563763820.404741578188191
1250.5146822160784860.9706355678430280.485317783921514
1260.5807327287400250.838534542519950.419267271259975
1270.8022736881082760.3954526237834470.197726311891723
1280.7305355399665690.5389289200668620.269464460033431
1290.8911090991669850.217781801666030.108890900833015
1300.9596638267237870.08067234655242690.0403361732762134
1310.9295009618357980.1409980763284040.0704990381642022
1320.9194603851366650.1610792297266700.0805396148633351
1330.906679428476620.1866411430467580.0933205715233792
1340.8421075913769550.3157848172460890.157892408623045
1350.7525110589529420.4949778820941160.247488941047058
1360.556576835373950.8868463292520990.443423164626049
1370.59181223167530.81637553664940.4081877683247


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level110.092436974789916NOK
10% type I error level310.260504201680672NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/10ieea1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/10ieea1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/1tdzz1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/1tdzz1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/2tdzz1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/2tdzz1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/34myk1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/34myk1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/44myk1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/44myk1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/54myk1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/54myk1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/6evgm1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/6evgm1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/77nfp1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/77nfp1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/87nfp1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/87nfp1291202429.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/97nfp1291202429.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/01/t12912023761ayg83hp2n6dw8l/97nfp1291202429.ps (open in new window)


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