Home » date » 2010 » Nov » 23 »

workshop 7.3

*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: Tue, 23 Nov 2010 16:16:23 +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/Nov/23/t1290529236g94n5vc7q2j8dh7.htm/, Retrieved Tue, 23 Nov 2010 17:20:49 +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/Nov/23/t1290529236g94n5vc7q2j8dh7.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 «
9 4 2 5 4 3 9 4 2 4 3 2 9 5 4 4 2 2 9 3 2 4 2 2 9 4 3 2 2 2 9 3 4 5 2 2 10 4 3 5 3 2 10 3 3 4 2 1 10 2 3 3 1 2 10 4 2 4 2 2 10 2 4 4 2 2 10 2 3 3 2 2 10 1 3 3 2 2 10 4 4 4 2 2 10 4 4 5 1 1 10 2 3 4 2 2 10 2 3 2 2 1 10 3 3 4 3 2 10 3 4 4 4 2 10 3 2 4 4 2 10 4 5 4 4 4 10 3 4 4 4 2 10 2 2 4 4 4 10 2 3 5 2 2 10 4 4 4 2 2 10 4 4 4 4 2 10 3 3 4 2 2 10 4 4 4 3 2 10 2 4 4 2 2 10 4 1 4 4 2 10 4 4 4 3 3 10 5 5 2 4 2 10 5 2 4 2 2 10 4 4 4 2 2 10 4 3 5 4 3 10 4 2 5 5 4 10 2 4 4 2 1 10 4 5 3 4 2 10 4 4 4 4 3 10 4 4 5 5 3 10 3 4 4 3 2 10 2 3 4 2 2 10 3 4 5 3 2 10 4 2 4 2 2 10 3 2 5 1 2 10 2 4 4 2 2 10 4 2 4 4 4 10 4 4 4 4 4 10 3 4 3 4 2 10 4 1 4 4 3 10 3 4 4 2 2 10 4 2 4 2 2 10 2 1 2 1 1 10 4 4 3 4 3 10 4 3 5 2 4 10 4 2 4 4 2 10 4 4 4 2 2 10 3 3 5 2 1 10 1 2 3 1 2 10 3 2 5 2 2 10 3 3 4 2 2 10 4 2 5 2 2 10 2 1 4 2 2 10 3 3 4 1 1 10 5 2 5 5 2 10 4 3 4 3 3 10 4 3 4 2 2 10 3 3 5 1 1 10 4 2 4 2 2 10 2 3 3 4 4 10 3 2 4 2 2 10 4 4 5 5 3 10 3 4 5 4 4 10 4 4 5 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 time16 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
YT[t] = + 8.56713904540317 -0.735371589104438T1[t] + 0.0759378528567064X1[t] + 0.251758435553541X2[t] + 0.366360559218664X3[t] -0.117608217425018X4[t] + 0.000361144076985856t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.567139045403173.755632.28110.0239480.011974
T1-0.7353715891044380.380985-1.93020.0554710.027735
X10.07593785285670640.0733141.03580.3019650.150982
X20.2517584355535410.084422.98220.0033410.001671
X30.3663605592186640.0720635.08391e-061e-06
X4-0.1176082174250180.089717-1.31090.1919020.095951
t0.0003611440769858560.0016630.21720.8283350.414167


Multiple Linear Regression - Regression Statistics
Multiple R0.478480661179188
R-squared0.228943743122473
Adjusted R-squared0.198101492847372
F-TEST (value)7.42305574594532
F-TEST (DF numerator)6
F-TEST (DF denominator)150
p-value5.69652836457379e-07
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.861155699499398
Sum Squared Residuals111.238370817045


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
144.47244135562101-0.472441355621013
243.972291722350760.0277082776492371
353.758168012922481.24183198707752
433.60665345128606-0.606653451286056
543.179435577112670.820564422887334
634.01100988070698-1.01100988070698
743.566422142041480.433577857958518
833.06627250877128-0.0662725087712795
922.33090644065104-0.330906440651041
1042.873448726643531.12655127335647
1123.02568557643392-1.02568557643392
1222.69835043210066-0.698350432100663
1312.69871157617765-1.69871157617765
1443.026769008664880.973230991335118
1543.030136246501760.969863753498236
1622.95155344396215-0.951553443962148
1722.56600593435707-0.566005934357069
1833.31863629133478-0.318636291334784
1933.76129584748714-0.76129584748714
2033.60978128585071-0.609781285850714
2143.602739553647780.397260446352219
2233.7623792797181-0.762379279718098
2323.37564828323163-1.37564828323163
2423.20620103213158-1.20620103213158
2543.030741593511730.969258406488273
2643.763823856026040.236176143973959
2732.955526028808990.0444739711910075
2843.398185584961350.601814415038651
2923.03218616981967-1.03218616981967
3043.537454873763870.462545126236133
3143.281660799767290.718339200232712
3253.338411702237581.66158829776242
3352.88175504041422.1182449595858
3443.03399189020460.9660081097954
3543.825286517990730.174713482009269
3643.998462151004660.00153784899534324
3723.15268353986058-1.15268353986058
3843.592337002253040.407662997746964
3943.650910511601840.349089488398161
4044.26939065045103-0.269390650451030
4133.40288045796216-0.402880457962165
4222.96094318996378-0.96094318996378
4333.65536118166968-0.655361181669678
4442.885727625261051.11427237473895
4532.771486645672910.228513354327091
4623.03832561912843-1.03832561912843
4743.384315741079300.615684258920705
4843.536552590869690.463447409130307
4933.52037173424317-0.520371734243174
5043.427069537878570.572930462121435
5133.04013133951336-0.040131339513359
5242.888616777876931.11138322212307
5322.06077085619648-0.0607708561964836
5443.404569237203090.595430762796915
5542.98218006366811.01781993633190
5643.622782472622200.377217527377796
5743.042298203975270.957701796024726
5833.33608814817411-0.336088148174114
5912.27302579164363-1.27302579164363
6033.14326436604636-0.143264366046361
6132.967804927426510.0321950725734884
6243.143986654200330.856013345799667
6322.81665150986707-0.816651509867071
6432.720136017863820.279863982136177
6554.244151764087280.755848235912717
6643.218362989605090.781637010394913
6742.969971791888431.03002820811157
6832.973339029725310.0266609702746920
6942.894756227185691.10524377281431
7023.21680147215313-1.21680147215313
7132.895478515339660.104521484660336
7244.28094726091458-0.280947260914578
7333.79733962834788-0.797339628347881
7443.666556648056240.333443351943761
7542.661706656797571.33829334320243
7633.09083030600632-0.0908303060063177
7733.30127952106853-0.301279521068533
7823.22570281228881-1.22570281228881
7943.547748057256250.452251942743745
8033.03287903016106-0.0328790301610601
8122.72326937341269-0.723269373412687
8223.70811007148054-1.70811007148054
8333.78440906841423-0.784409068414235
8422.78256517091546-0.782565170915462
8523.05241023813088-1.05241023813088
8643.267256235713120.732743764286884
8743.270623473550.729376526450002
8843.786214788799160.213785211200836
8922.97791696158212-0.977916961582115
9023.5517206421031-1.5517206421031
9142.905707490639281.09429250936072
9222.65130410540283-0.651304105402826
9333.09396366155518-0.0939636615551816
9433.23148111752059-0.231481117520586
9553.881222650898281.11877734910172
9632.669290682414270.330709317585726
9743.229558455991650.770441544008352
9833.05710511113169-0.0571051111316942
9922.86392018492696-0.863920184926956
10043.057827399285670.942172600714334
10133.09985890793096-0.099858907930964
10232.982611834582930.0173881654170684
10332.907035125803210.0929648741967886
10443.601453117509110.398546882490891
10512.16902410800006-1.16902410800006
10632.984056410890870.0159435891091249
10723.02007573201638-1.02007573201638
10833.3094688936952-0.309468893695199
10923.16096042581867-1.16096042581867
11022.56092806270834-0.560928062708337
11122.82658354928247-0.826583549282474
11242.582589134085841.41741086591416
11354.237541802799180.76245819720082
11452.662255368856412.33774463114359
11532.987306707583750.0126932924162523
11642.560088833410361.43991116658964
11742.080877983363681.91912201663632
11833.0226576281031-0.0226576281030992
11922.85460106576317-0.854601065763168
12043.970585888199650.0294141118003487
12122.73771513649212-0.737715136492121
12232.620468063144090.379531936855911
12323.28362466032149-1.28362466032149
12422.91461915141991-0.914619151419914
12522.69748934823175-0.697489348231753
12643.184825362712320.815174637287684
12743.358000995726240.641999004273758
12842.992001580584561.00799841941544
12943.607475625673860.39252437432614
13033.54962440447903-0.549624404479028
13122.99308501281552-0.993085012815521
13243.802105128186540.197894871813458
13333.80246627226353-0.802466272263528
13422.91823059218977-0.918230592189773
13543.80318856041750.196811439582501
13632.915946786583850.0840532134161509
13733.07118973013414-0.0711897301341425
13832.995613021354420.0043869786455776
13932.741209636117970.258790363882029
14033.14960170398193-0.149601703981933
14143.6534797191660.346520280833998
14253.862106327349711.13789367265029
14323.03908910630766-1.03908910630766
14443.128924010184970.871075989815035
14533.72785605457076-0.727856054570756
14632.377377085438210.622622914561792
14712.49534644694021-1.49534644694021
14823.07516231498099-1.07516231498099
14942.823765023504431.17623497649557
15042.840668168284921.15933183171508
15154.057719207442920.942280792557081
15222.82184236197549-0.821842361975493
15343.404664323776160.595335676223836
15433.00139132658620-0.00139132658619608
15523.36811302988185-1.36811302988185
15643.326803809390520.67319619060948
15722.47382952384526-0.473829523845264


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.8149006286561090.3701987426877820.185099371343891
110.8327424513566170.3345150972867660.167257548643383
120.7535535132377820.4928929735244370.246446486762218
130.7317873541446620.5364252917106750.268212645855338
140.9213849593841120.1572300812317760.0786150406158878
150.9181432590849630.1637134818300740.0818567409150371
160.8862712013359230.2274575973281530.113728798664077
170.8396108627536650.3207782744926690.160389137246335
180.7995668784925770.4008662430148470.200433121507423
190.7400151476328630.5199697047342740.259984852367137
200.68161900395140.6367619920971990.318380996048600
210.6990695174049970.6018609651900050.300930482595003
220.6418027593556970.7163944812886060.358197240644303
230.602429266403450.79514146719310.39757073359655
240.5603936276907970.8792127446184060.439606372309203
250.6662591280425660.6674817439148680.333740871957434
260.6314044939702820.7371910120594360.368595506029718
270.5841685859164010.8316628281671970.415831414083599
280.5586152202643880.8827695594712240.441384779735612
290.5767518498510590.8464963002978820.423248150148941
300.623919658930790.752160682138420.37608034106921
310.619969599354790.760060801290420.38003040064521
320.6770857442536640.6458285114926720.322914255746336
330.855053469007730.2898930619845390.144946530992269
340.8313337672316540.3373324655366930.168666232768346
350.791761673755630.4164766524887390.208238326244370
360.748281876488570.503436247022860.25171812351143
370.8603121127342530.2793757745314940.139687887265747
380.8297501139997460.3404997720005090.170249886000254
390.7934523612699350.4130952774601310.206547638730065
400.7606999591565690.4786000816868630.239300040843432
410.7451072465608740.5097855068782530.254892753439126
420.7722557680686970.4554884638626060.227744231931303
430.7559484803106720.4881030393786570.244051519689328
440.7685043550055260.4629912899889480.231495644994474
450.7264018666329190.5471962667341620.273598133367081
460.7646005507246950.470798898550610.235399449275305
470.733664099383860.5326718012322810.266335900616140
480.6932008991844370.6135982016311270.306799100815563
490.677406912956420.6451861740871610.322593087043580
500.6414428029383960.7171143941232080.358557197061604
510.5949581679236720.8100836641526560.405041832076328
520.5987863860370360.8024272279259290.401213613962964
530.5632795667820590.8734408664358820.436720433217941
540.5228839423360940.9542321153278110.477116057663906
550.5097302330955370.9805395338089260.490269766904463
560.4652253065388930.9304506130777870.534774693461107
570.4521152476848870.9042304953697750.547884752315113
580.4144119208658860.8288238417317720.585588079134114
590.521495145987710.957009708024580.47850485401229
600.4754005689395240.9508011378790480.524599431060476
610.4279091845541660.8558183691083320.572090815445834
620.4176843139874740.8353686279749480.582315686012526
630.4221432139336840.8442864278673690.577856786066316
640.37752807520330.75505615040660.6224719247967
650.3629324745313700.7258649490627390.63706752546863
660.3421473916189360.6842947832378730.657852608381064
670.3443062721121530.6886125442243070.655693727887847
680.3020593151145740.6041186302291480.697940684885426
690.3155236371899890.6310472743799780.684476362810011
700.4001643104302210.8003286208604410.59983568956978
710.3574939390455120.7149878780910240.642506060954488
720.3269586034417120.6539172068834230.673041396558288
730.3313252884068380.6626505768136760.668674711593162
740.2945334415514530.5890668831029060.705466558448547
750.3445992806042970.6891985612085930.655400719395703
760.3052358458113620.6104716916227250.694764154188638
770.2738669070822560.5477338141645120.726133092917744
780.3182437551624150.6364875103248310.681756244837584
790.2904381173014760.5808762346029520.709561882698524
800.2545228224025850.509045644805170.745477177597415
810.247114366232420.494228732464840.75288563376758
820.3522912163916470.7045824327832930.647708783608353
830.3402364366609590.6804728733219180.659763563339041
840.3326164751101680.6652329502203360.667383524889832
850.3527527882149580.7055055764299160.647247211785042
860.3426133237671720.6852266475343450.657386676232828
870.3328126887984890.6656253775969780.66718731120151
880.2939704873670530.5879409747341060.706029512632947
890.3038405832222970.6076811664445930.696159416777703
900.4034848173079440.8069696346158890.596515182692056
910.4344221126693420.8688442253386840.565577887330658
920.4123185453153960.8246370906307910.587681454684604
930.3697369852852030.7394739705704060.630263014714797
940.328309195412670.656618390825340.67169080458733
950.3455316794027320.6910633588054640.654468320597268
960.3112056984743190.6224113969486370.688794301525681
970.3035951000139910.6071902000279820.696404899986009
980.2627921539221910.5255843078443810.73720784607781
990.2580932734912880.5161865469825770.741906726508712
1000.2597455933822930.5194911867645850.740254406617707
1010.2219319277103610.4438638554207230.778068072289639
1020.1867245307263870.3734490614527750.813275469273613
1030.1561575343187040.3123150686374090.843842465681296
1040.1358506666875280.2717013333750570.864149333312472
1050.1545218078269800.3090436156539590.84547819217302
1060.1263895780565950.252779156113190.873610421943405
1070.1471161713180160.2942323426360320.852883828681984
1080.1254660065429880.2509320130859760.874533993457012
1090.1423880974809750.2847761949619500.857611902519025
1100.1342492747705450.2684985495410890.865750725229455
1110.1565676200391720.3131352400783430.843432379960828
1120.1969276784060440.3938553568120880.803072321593956
1130.1747790159099730.3495580318199470.825220984090027
1140.4946030954116470.9892061908232940.505396904588353
1150.4399370682659670.8798741365319330.560062931734034
1160.4895328709616810.9790657419233620.510467129038319
1170.8124842605040270.3750314789919450.187515739495973
1180.783303973962030.4333920520759390.216696026037970
1190.7583890214975870.4832219570048260.241610978502413
1200.7148363690872960.5703272618254080.285163630912704
1210.6859252205416330.6281495589167340.314074779458367
1220.6456339698328810.7087320603342380.354366030167119
1230.6532553838374430.6934892323251140.346744616162557
1240.6282174518679370.7435650962641260.371782548132063
1250.6538231628527430.6923536742945130.346176837147257
1260.6355667671381240.7288664657237520.364433232861876
1270.6062399504230340.7875200991539310.393760049576966
1280.6730624080816640.6538751838366710.326937591918336
1290.6172737659194480.7654524681611040.382726234080552
1300.5929810999613490.8140378000773030.407018900038651
1310.5799068612674790.8401862774650420.420093138732521
1320.5117010666093480.9765978667813030.488298933390652
1330.6148941345112240.7702117309775530.385105865488776
1340.5860843250505440.8278313498989120.413915674949456
1350.5629468293782290.8741063412435420.437053170621771
1360.4831440396325160.9662880792650320.516855960367484
1370.4874873251353990.9749746502707980.512512674864601
1380.4369389334938370.8738778669876750.563061066506163
1390.3555419908373270.7110839816746530.644458009162673
1400.2887960390995820.5775920781991640.711203960900418
1410.2404078817040330.4808157634080660.759592118295967
1420.1957946588509560.3915893177019120.804205341149044
1430.1441316299856420.2882632599712830.855868370014358
1440.09471648933896750.1894329786779350.905283510661033
1450.0847266641485860.1694533282971720.915273335851414
1460.08570808306785130.1714161661357030.914291916932149
1470.05281654414789150.1056330882957830.947183455852109


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/10w6hn1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/10w6hn1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/1pn2t1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/1pn2t1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/20wje1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/20wje1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/30wje1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/30wje1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/40wje1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/40wje1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/50wje1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/50wje1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/6t6ih1290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/6t6ih1290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/780781290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/780781290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/880781290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/880781290528966.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/980781290528966.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290529236g94n5vc7q2j8dh7/980781290528966.ps (open in new window)


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