Home » date » 2010 » Dec » 28 »

*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: Mon, 27 Dec 2010 23:21:00 +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/28/t1293492266exmojc41t6wjk4u.htm/, Retrieved Tue, 28 Dec 2010 00:24:37 +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/28/t1293492266exmojc41t6wjk4u.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 14 11 12 24 26 9 11 7 8 25 23 9 6 17 8 30 25 9 12 10 8 19 23 9 8 12 9 22 19 9 10 12 7 22 29 10 10 11 4 25 25 10 11 11 11 23 21 10 16 12 7 17 22 10 11 13 7 21 25 10 13 14 12 19 24 10 12 16 10 19 18 10 8 11 10 15 22 10 12 10 8 16 15 10 11 11 8 23 22 10 4 15 4 27 28 10 9 9 9 22 20 10 8 11 8 14 12 10 8 17 7 22 24 10 14 17 11 23 20 10 15 11 9 23 21 10 16 18 11 21 20 10 9 14 13 19 21 10 14 10 8 18 23 10 11 11 8 20 28 10 8 15 9 23 24 10 9 15 6 25 24 10 9 13 9 19 24 10 9 16 9 24 23 10 9 13 6 22 23 10 10 9 6 25 29 10 16 18 16 26 24 10 11 18 5 29 18 10 8 12 7 32 25 10 9 17 9 25 21 10 16 9 6 29 26 10 11 9 6 28 22 10 16 12 5 17 22 10 12 18 12 28 22 10 12 12 7 29 23 10 14 18 10 26 30 10 9 14 9 25 23 10 10 15 8 14 17 10 9 16 5 25 23 10 10 10 8 26 23 10 12 11 8 20 25 10 14 14 10 18 24 10 14 9 6 32 24 10 10 12 8 25 23 10 14 17 7 25 21 10 16 5 4 23 24 10 9 12 8 21 24 10 10 12 8 20 28 10 6 6 4 15 16 10 8 24 20 30 20 10 13 12 8 24 29 10 10 12 8 26 27 10 8 14 6 24 22 10 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 time15 seconds
R Server'George Udny Yule' @ 72.249.76.132
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
ParentalCriticism[t] = + 16.601138887406 -1.41670508965093Month[t] + 0.150238793812559DoubtsActions[t] + 0.440939298378178ParentalExpectations[t] + 0.0298388827345439Standards[t] -0.103111653402745`Organization `[t] + 0.000949138149842271t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.6011388874069.4432871.7580.0807630.040382
Month-1.416705089650930.948296-1.49390.1372620.068631
DoubtsActions0.1502387938125590.0613722.4480.0155040.007752
ParentalExpectations0.4409392983781780.0531828.291100
Standards0.02983888273454390.0458550.65070.516210.258105
`Organization `-0.1031116534027450.049627-2.07770.0394150.019708
t0.0009491381498422710.0040250.23580.8138930.406947


Multiple Linear Regression - Regression Statistics
Multiple R0.630420955153921
R-squared0.397430580697182
Adjusted R-squared0.373644945724703
F-TEST (value)16.7088488979595
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value9.43689570931383e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.14243533599839
Sum Squared Residuals697.684433678052


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1128.84064781139073.15935218860930
286.966297217533141.03370278246686
3810.5684164772692-2.5684164772692
488.26221888637267-0.262218886372668
599.04605470784323-0.046054707843233
678.31636489959075-1.31636489959075
746.96163291152608-2.96163291152608
8117.465589691630383.53441030836962
978.3765271474112-1.37652714741119
1077.87724218560636-0.877242185606358
11128.663042097693153.33695790230685
121010.0143009592033-0.0143009592032610
13106.677796285662823.32220371433718
1487.590381757238480.40961824276152
1587.369122005276530.630877994723465
1647.58284239077288-3.58284239077288
1796.36504852126572.63495147873431
1887.683819627704940.316180372295060
1979.33177577716726-2.33177577716726
201110.67644317453800.32355682546202
2198.078883662828570.921116337171431
221111.3600805713719-0.360080571371874
23138.382811540449264.61718845955074
2487.135135264609150.86486473539085
2586.670426818154861.32957318184514
2698.486380030194350.513619969805654
2768.69724572762584-2.69724572762584
2897.637282972612061.36271702738794
2999.2133560729719-0.213356072971898
3067.83180955051812-1.83180955051812
3165.690087016754970.309912983245029
321611.10631975293204.89368024706796
33511.0642614906392-6.06426149063919
3477.3365935314667-0.3365935314667
3599.89605238978916-0.896052389789164
3667.02495596152595-1.02495596152594
3766.65731886148943-0.657318861489429
3858.40405215375662-3.40405215375662
391210.77790961700531.22209038299473
4078.05995019421785-1.05995019421785
411010.1957144882390-0.195714488239030
4298.373655154898040.626344845101964
4389.2562245955751-1.25622459557510
4459.25743202795408-4.25743202795408
4586.792823052381951.20717694761805
4687.149932473322340.850067526677662
47108.817610982165491.18238901783451
4867.03160798670806-1.03160798670806
4987.648659319003130.351340680996865
50710.6614834310996-3.66148343109959
5145.3026258506591-1.30262585065909
5287.278800755299180.721199244700818
5386.987703190916061.01229680908394
5444.83020679070682-0.830206790706819
552013.10367751469626.89632248530384
5687.45751086433870.542489135661306
5787.273644693325440.726355306674562
5868.31187534215115-2.31187534215115
5944.39766291195563-0.397662911955634
6089.2447869698316-1.24478696983160
6197.273747993448651.72625200655135
6267.96898687719197-1.96898687719197
6378.29890628773413-1.29890628773413
6496.216905043038442.78309495696156
6557.04387293461517-2.04387293461517
6655.94946728881653-0.949467288816528
6786.731698618090621.26830138190938
6888.22329452069033-0.223294520690335
6966.85122326346855-0.851223263468548
7087.171667408778710.828332591221287
7177.32298001040457-0.322980010404573
7276.078077276564240.92192272343576
7398.594360541182180.405639458817822
741111.0095397666120-0.00953976661196645
7568.63969270541552-2.63969270541552
7687.731314942181650.268685057818353
7768.39155082308347-2.39155082308347
7898.665912208123660.334087791876342
7986.417384768481611.58261523151839
8068.37237234724173-2.37237234724173
81108.308479599815521.69152040018448
8286.090040382234931.90995961776507
8388.34642525909655-0.346425259096550
84109.042047106732460.957952893267536
8555.92854636411674-0.928546364116737
8679.3454673507971-2.34546735079711
8757.17051449965076-2.17051449965076
8886.285465301077131.71453469892287
89149.913649045006494.08635095499351
9077.65508622807581-0.655086228075807
9188.829534178024-0.829534178024006
9264.892376147060841.10762385293916
9356.27913123439787-1.27913123439787
9469.23400674288517-3.23400674288517
95106.569339437155993.43066056284401
961211.56125971638290.438740283617103
9799.15195047208361-0.151950472083608
981210.87838703591951.12161296408053
9977.54322856034637-0.543228560346373
10088.34157909749244-0.341579097492441
101109.167377939265870.83262206073413
10267.27543726990533-1.27543726990533
1031011.2088362340758-1.2088362340758
104108.706958347218451.29304165278155
105107.093962598177172.90603740182283
10658.44895823576181-3.44895823576181
10776.931150888587180.0688491114128244
108108.641218905224141.35878109477586
109119.74608733698031.2539126630197
11068.2153464008538-2.2153464008538
11177.49124720019924-0.491247200199236
112128.859750795786243.14024920421376
113116.365604755307084.63439524469292
1141110.82233145533620.177668544663818
115115.465945599067955.53405440093205
11657.63024610145471-2.63024610145471
117810.2449469104578-2.24494691045777
11866.80482294995854-0.804822949958538
11999.4462437582705-0.446243758270487
12046.7755796691547-2.77557966915471
12145.79549010385074-1.79549010385074
12278.35125570969704-1.35125570969704
123119.614175927709031.38582407229097
12464.418313581868911.58168641813109
12577.07416795979127-0.0741679597912713
12689.95732271130627-1.95732271130626
12746.34770760870298-2.34770760870298
12887.093766885332280.906233114667723
12998.177778476600460.822221523399537
13087.709170961941470.290829038058529
131118.803386123760122.19661387623988
13287.514872353822080.48512764617792
13356.76819610572183-1.76819610572183
13445.89716839983827-1.89716839983827
13587.461735255278680.538264744721324
1361011.8424156426398-1.84241564263980
13768.3132015214279-2.31320152142790
13899.38631050343167-0.386310503431667
13997.21113698052291.7888630194771
140138.921123851094794.07887614890521
14197.882444424059941.11755557594006
142109.582691834039040.417308165960961
1432014.85120102417425.14879897582581
14456.06285773606914-1.06285773606914
1451110.43862334265020.561376657349783
14668.15778529610135-2.15778529610135
147910.2085791693770-1.20857916937699
14877.34142533291684-0.341425332916843
14998.17686763318410.823132366815906
150108.486063827803961.51393617219604
15196.986766266608482.01323373339152
152810.2786599686877-2.27865996868767
153711.3667477763246-4.3667477763246
15469.4351535187033-3.4351535187033
1551311.70651722119811.29348277880191
15668.0681076160001-2.06810761600011
15787.778231579920870.221768420079131
158109.539244659107270.460755340892733
1591611.81169626534034.18830373465973


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.8319100672611350.3361798654777290.168089932738864
110.8313060909680180.3373878180639650.168693909031982
120.8321397934778430.3357204130443140.167860206522157
130.9059827983223040.1880344033553910.0940172016776957
140.874792259852050.25041548029590.12520774014795
150.8213360116364880.3573279767270240.178663988363512
160.7861555052614630.4276889894770730.213844494738537
170.7723071609937960.4553856780124090.227692839006204
180.7217280472921550.556543905415690.278271952707845
190.6574439305403860.6851121389192280.342556069459614
200.5867482047705370.8265035904589270.413251795229463
210.5126530258193940.9746939483612110.487346974180606
220.4330837570575290.8661675141150580.566916242942471
230.669122868612590.6617542627748190.330877131387409
240.63647296227790.7270540754442010.363527037722101
250.5721921696352470.8556156607295070.427807830364753
260.5073360965613270.9853278068773450.492663903438673
270.5221753794247990.9556492411504020.477824620575201
280.4648400733213860.9296801466427710.535159926678614
290.3996207972864010.7992415945728020.600379202713599
300.3993597299213990.7987194598427990.6006402700786
310.3382614342402520.6765228684805040.661738565759748
320.588974486582190.822051026835620.41102551341781
330.8236162692557290.3527674614885420.176383730744271
340.7973147382290940.4053705235418120.202685261770906
350.7552498357893730.4895003284212540.244750164210627
360.7404946437772610.5190107124454780.259505356222739
370.6930654386079150.613869122784170.306934561392085
380.8372783043349940.3254433913300120.162721695665006
390.8452694320073870.3094611359852250.154730567992613
400.8127144728327810.3745710543344370.187285527167219
410.7744903619272600.4510192761454810.225509638072740
420.7468402660118720.5063194679762550.253159733988128
430.7166112134155920.5667775731688170.283388786584408
440.780220806896130.4395583862077390.219779193103869
450.7656239685223750.468752062955250.234376031477625
460.7292090702933840.5415818594132310.270790929706616
470.6969218314217570.6061563371564860.303078168578243
480.6563663165726640.6872673668546730.343633683427336
490.6160036338660880.7679927322678240.383996366133912
500.6638918058496510.6722163883006970.336108194150349
510.6522873333149660.6954253333700680.347712666685034
520.618018353134450.76396329373110.38198164686555
530.580188696779340.839622606441320.41981130322066
540.5369875320238030.9260249359523940.463012467976197
550.9449513326092930.1100973347814140.0550486673907069
560.9310626784471820.1378746431056350.0689373215528176
570.9163046457833910.1673907084332180.0836953542166089
580.9149714513079350.1700570973841290.0850285486920645
590.894864332940340.2102713341193210.105135667059660
600.8793580645156120.2412838709687760.120641935484388
610.8731859401772560.2536281196454890.126814059822744
620.8647096944240780.2705806111518440.135290305575922
630.8454593773069580.3090812453860850.154540622693042
640.8673724408419570.2652551183160870.132627559158044
650.8608558405302920.2782883189394150.139144159469708
660.8384932795808110.3230134408383780.161506720419189
670.8214006735318260.3571986529363480.178599326468174
680.7904808485502780.4190383028994440.209519151449722
690.7594803338236190.4810393323527620.240519666176381
700.72880490288040.54239019423920.2711950971196
710.6886035908177110.6227928183645780.311396409182289
720.6551103114125550.689779377174890.344889688587445
730.6138556194060480.7722887611879040.386144380593952
740.5679460470245030.8641079059509940.432053952975497
750.5864297763459930.8271404473080150.413570223654007
760.5414267606405960.9171464787188080.458573239359404
770.5477063917609910.9045872164780180.452293608239009
780.5031357283597860.9937285432804270.496864271640214
790.4807282011163660.9614564022327330.519271798883634
800.488321224729920.976642449459840.51167877527008
810.4696414314768570.9392828629537150.530358568523142
820.458844661213060.917689322426120.54115533878694
830.4131132298285740.8262264596571470.586886770171426
840.3783297383534520.7566594767069040.621670261646548
850.3427969459691380.6855938919382760.657203054030862
860.3477975075778290.6955950151556580.652202492422171
870.3527505110873530.7055010221747060.647249488912647
880.3326373442387460.6652746884774920.667362655761254
890.4466132814621120.8932265629242250.553386718537888
900.4032767585743490.8065535171486980.596723241425651
910.3634613498912060.7269226997824130.636538650108794
920.3308940236033860.6617880472067720.669105976396614
930.3013306869384950.6026613738769910.698669313061505
940.352474204593940.704948409187880.64752579540606
950.4173952046295040.8347904092590080.582604795370496
960.3751620507243420.7503241014486840.624837949275658
970.3303707785220820.6607415570441640.669629221477918
980.2990195224423740.5980390448847470.700980477557626
990.2598976774958760.5197953549917510.740102322504125
1000.2226457251048750.4452914502097490.777354274895125
1010.1929506242959370.3859012485918740.807049375704063
1020.1709232624077250.3418465248154490.829076737592275
1030.1527913597432010.3055827194864030.847208640256799
1040.1333223572993930.2666447145987860.866677642700607
1050.1617638536582370.3235277073164740.838236146341763
1060.2077749276707880.4155498553415760.792225072329212
1070.1755455632283390.3510911264566780.82445443677166
1080.1560774295181010.3121548590362030.843922570481899
1090.1363875274819290.2727750549638590.86361247251807
1100.1338625326548050.267725065309610.866137467345195
1110.1097769086049950.2195538172099900.890223091395005
1120.1441995143425410.2883990286850830.855800485657459
1130.2710509590666050.5421019181332110.728949040933395
1140.2315775244645180.4631550489290360.768422475535482
1150.5852876141010310.8294247717979380.414712385898969
1160.574097852885310.851804294229380.42590214711469
1170.5706483700205710.8587032599588590.429351629979429
1180.519809933553040.960380132893920.48019006644696
1190.4647202899699020.9294405799398050.535279710030098
1200.5515038224933420.8969923550133160.448496177506658
1210.5225278002323450.9549443995353110.477472199767655
1220.5370470876616330.9259058246767330.462952912338367
1230.4888013198953050.977602639790610.511198680104695
1240.4973468144137190.9946936288274380.502653185586281
1250.4387770001743390.8775540003486770.561222999825661
1260.4439773973442260.8879547946884520.556022602655774
1270.4340714173520190.8681428347040380.565928582647981
1280.3977354412737980.7954708825475950.602264558726202
1290.356646308102530.713292616205060.64335369189747
1300.3083461821849520.6166923643699040.691653817815048
1310.2990218698924560.5980437397849120.700978130107544
1320.2471135445567710.4942270891135420.752886455443229
1330.2036768100539440.4073536201078880.796323189946056
1340.1719572874657220.3439145749314440.828042712534278
1350.1349425771846510.2698851543693020.865057422815349
1360.1276625290117250.2553250580234490.872337470988276
1370.1689740021300010.3379480042600030.831025997869999
1380.1754544231869290.3509088463738580.82454557681307
1390.1564498125704180.3128996251408370.843550187429582
1400.1881285591895930.3762571183791850.811871440810407
1410.1385965674204540.2771931348409080.861403432579546
1420.104487832738710.208975665477420.89551216726129
1430.1686169121708350.337233824341670.831383087829165
1440.1189959633532940.2379919267065880.881004036646706
1450.09140861326331480.1828172265266300.908591386736685
1460.05788526393063280.1157705278612660.942114736069367
1470.0337956032000560.0675912064001120.966204396799944
1480.01674489870674780.03348979741349570.983255101293252
1490.00737298239011370.01474596478022740.992627017609886


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0142857142857143OK
10% type I error level30.0214285714285714OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/10000w1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/10000w1293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/1mqk51293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/1mqk51293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/2mqk51293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/2mqk51293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/3mqk51293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/3mqk51293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/4xi1q1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/4xi1q1293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/5xi1q1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/5xi1q1293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/6xi1q1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/6xi1q1293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/7791b1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/7791b1293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/8000w1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/8000w1293492044.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/9000w1293492044.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293492266exmojc41t6wjk4u/9000w1293492044.ps (open in new window)


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