Home » date » 2010 » Dec » 11 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sat, 11 Dec 2010 09:59:39 +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/11/t12920615639yf6wmxfgq3mrk4.htm/, Retrieved Sat, 11 Dec 2010 10:59:34 +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/11/t12920615639yf6wmxfgq3mrk4.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 «
13 15 2 9 42 12 12 18 1 9 51 15 15 11 1 9 42 14 12 16 1 8 46 10 10 12 2 14 41 10 12 17 2 14 49 9 15 15 1 15 47 18 9 19 1 11 33 11 11 18 1 8 47 12 11 10 2 14 42 11 11 14 1 9 32 15 15 18 1 6 53 17 7 18 2 14 41 14 11 14 2 8 41 24 11 14 1 11 33 7 10 12 1 16 37 18 14 16 2 11 43 11 6 13 2 13 33 14 11 16 1 7 49 18 15 14 2 9 42 12 11 9 1 15 43 11 12 9 2 16 37 5 14 17 1 10 43 12 15 13 2 14 42 11 9 15 2 12 43 10 13 17 1 6 46 11 13 16 2 4 33 15 16 12 1 12 42 16 13 11 1 14 40 14 12 16 2 13 44 8 14 17 1 9 42 13 11 17 2 14 52 18 9 16 1 14 44 17 16 13 2 10 45 10 12 12 1 14 46 13 10 12 2 8 36 11 13 16 1 8 45 12 16 14 1 10 49 12 14 12 2 9 43 12 15 12 1 9 43 9 5 14 1 11 37 18 8 8 2 15 32 7 11 15 1 9 45 14 16 14 2 9 45 16 17 11 1 10 45 12 9 13 2 8 45 17 9 14 1 8 31 12 13 15 1 14 33 9 10 16 1 10 44 12 6 10 2 11 49 9 12 11 2 9 44 13 8 12 2 12 41 10 14 14 2 13 44 10 12 15 1 14 38 11 11 16 1 15 33 13 16 9 1 11 47 13 8 11 2 9 37 13 15 15 1 8 48 6 7 15 2 7 40 7 16 13 2 10 50 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
belonging[t] = + 33.7628490052607 + 0.576297541832057popularity[t] + 0.478113214787677hapiness[t] -1.43366386194624gender[t] -0.413115473681592doubsaboutactions[t] + 0.180267632695104parentalexpectations[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)33.76284900526076.5885035.12451e-060
popularity0.5762975418320570.1957752.94370.0038110.001906
hapiness0.4781132147876770.2617141.82690.0698980.034949
gender-1.433663861946241.23424-1.16160.2474280.123714
doubsaboutactions-0.4131154736815920.223849-1.84550.0671220.033561
parentalexpectations0.1802676326951040.1724621.04530.2977430.148872


Multiple Linear Regression - Regression Statistics
Multiple R0.417432508416781
R-squared0.174249899083126
Adjusted R-squared0.144113034086160
F-TEST (value)5.78195174251427
F-TEST (DF numerator)5
F-TEST (DF denominator)137
p-value7.09848962427984e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.80662163087911
Sum Squared Residuals6347.22342955535


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14244.0042598762073-2.00425987620725
25146.83676873876964.16323126123041
34245.0386012280569-3.03860122805688
44645.39231961940030.607680380599712
54138.41491497254972.58508502745032
64941.77780849745717.22219150254293
74745.19343177589851.80656822410153
83344.0386878499175-11.0386878499175
94746.13278377253380.867216227466201
104238.21525371750153.78474628249851
113244.3480183377868-12.3480183377868
125350.16554305070072.83445694929927
134140.275772166560.724227833440006
144144.9498786437781-3.9498786437781
153342.0796463288628-9.0796463288628
163740.4644889486936-3.46448894869356
174344.0521720527685-1.05217205276850
183337.7220240244711-4.72202402447114
194946.67127861281072.32872138718934
204244.6787417450835-2.67874174508349
214338.75768889097854.24231110902155
223736.40560130101210.59439869898794
234346.5573322358791-3.55733223587911
244241.95478352919270.0452164708072546
254340.09918802244382.90081197755616
264647.4532289560783-1.45322895607832
273347.088753357488-14.088753357488
284245.2142008290221-3.21420082902206
294041.8204287759848-1.82042877598483
304441.53254312365592.46745687634411
314247.1507153422558-5.1507153422558
325242.82391964988109.17608035011904
334442.44660758068031.55339241931970
344544.00327533305610.996724666943933
354641.54197681624534.45802318375466
363641.0738754473343-5.07387544733434
374546.3291524266226-1.32915242662256
384946.27558767518022.72441232481981
394343.1462177736761-0.146217773676077
404344.6153762793691-1.61537627936906
413740.6048050375166-3.6048050375166
423234.3959486579680-2.39594865796796
434544.64586391987940.354136080120617
444545.976109817696-0.97610981769596
454545.4175455726492-0.417545572649211
464542.05729691646062.94270308353941
473143.067735829719-12.0677358297190
483342.83154347166-9.83154347166001
494443.77402885376320.225971146236796
504936.212577163995812.7874228360042
514441.69577710791942.30422289208061
524138.08855083624882.91144916375125
534442.08944704313491.91055295686515
543842.6157811952182-4.61578119521817
553342.4650166598824-9.4650166598824
564743.65217376025533.34782623974469
573739.3905869405912-2.39058694059117
584845.92202849932842.07797150067163
594040.4713674091024-0.471367409102381
605044.54407823114145.45592176885862
615448.1797409301355.82025906986496
624347.5296596868481-4.52965968684812
635442.591930672739711.4080693272602
644444.4871387518542-0.487138751854244
654741.48463094709445.51536905290556
663342.920346022228-9.92034602222798
674546.7182062462211-1.71820624622112
683334.3969332011189-1.39693320111894
694445.5840202417591-1.58402024175911
704744.90723031507422.09276968492577
714540.3203917421624.679608257838
724341.7824765291871.21752347081298
734338.14491216224874.85508783775133
743344.4236756570102-11.4236756570102
754643.85512761626292.14487238373706
764743.89375564547753.10624435452245
774742.6030246908974.39697530910302
78040.8443202073073-40.8443202073073
794343.9339183209542-0.933918320954231
804642.58464582246723.41535417753283
813637.6845083783094-1.68450837830939
824238.78011826966983.21988173033017
834443.32443419318390.675565806816119
844747.3470839963446-0.347083996344561
854139.53437538638851.46562461361146
864744.48944680966272.51055319033731
874645.07837301591410.921626984085934
884747.2318141047555-0.231814104755542
894647.0663239787966-1.06632397879663
904644.25419328173821.74580671826182
913644.9833220743376-8.98332207433755
923040.2635041789879-10.2635041789879
934842.31184643760865.68815356239138
944540.7860874241354.21391257586502
954945.5656111625573.43438883744299
965547.11192809754967.88807190245038
971141.2106358874803-30.2106358874803
985245.89762787373896.10237212626114
993335.8460503522182-2.84605035221816
1004748.4024792961153-1.40247929611528
1013339.5825444075711-6.58254440757113
1024444.4244490685566-0.424449068556609
1034240.42586091947901.57413908052104
1045542.851973553277112.1480264467229
1054244.2853286544892-2.28532865448918
1064644.99942309573121.0005769042688
1074646.9155594434609-0.915559443460863
1084745.56997043355281.43002956644724
1093343.4866317181834-10.4866317181834
1105349.72523253746823.27476746253175
1114242.2572971430153-0.257297143015258
1124444.0353952489580-0.0353952489580468
1135544.943400741237810.0565992587622
1144035.46744497913234.53255502086767
1154645.32003702802160.67996297197837
1165345.88054230919427.11945769080578
1174445.870432834188-1.87043283418797
1183540.6678336923207-5.66783369232071
1194039.73296997140040.267030028599579
1204445.0966228796246-1.09662287962459
1214646.7482594466916-0.748259446691554
1224542.49451975724172.50548024275826
1235345.19265836435217.8073416356479
1244543.51219448234261.48780551765740
1254842.78363129509865.21636870490143
1264644.47539700145631.52460299854366
1275541.759708178989213.2402918210108
1284749.7343574693235-2.73435746932351
1294342.65594387069480.344056129305151
1303838.0828982613678-0.0828982613678303
1314040.2315434785775-0.231543478577502
1324742.25293787201954.74706212798049
1334742.10684136841374.89315863158632
1344240.71976616837141.28023383162857
1355342.573212832803510.4267871671965
1364344.0521720527685-1.05217205276850
1374444.8536655636319-0.853665563631855
1384243.2926230380161-1.29262303801609
1395144.55812803934776.44187196065227
1405442.952465938130011.0475340618700
1414142.0995565181411-1.09955651814110
1425142.81282563172378.18717436827628
1435144.49878287312266.50121712687743


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.6254795988306770.7490408023386460.374520401169323
100.489788634623320.979577269246640.51021136537668
110.4743386605142870.9486773210285730.525661339485713
120.3692425475725020.7384850951450030.630757452427498
130.281391045728540.562782091457080.71860895427146
140.1920752796108920.3841505592217840.807924720389108
150.1716614271174800.3433228542349610.82833857288252
160.1258440224503310.2516880449006620.874155977549669
170.1447216499687460.2894432999374920.855278350031254
180.09830617258488490.1966123451697700.901693827415115
190.1143386256607290.2286772513214580.88566137433927
200.1003553450617090.2007106901234170.899644654938291
210.1174731368421530.2349462736843050.882526863157847
220.08147744267452840.1629548853490570.918522557325472
230.06260623250938020.1252124650187600.93739376749062
240.04612215757594480.09224431515188950.953877842424055
250.03644229388389640.07288458776779280.963557706116104
260.02427333529268430.04854667058536860.975726664707316
270.06003284751220060.1200656950244010.9399671524878
280.04655300337647040.09310600675294080.95344699662353
290.03226442901692150.0645288580338430.967735570983078
300.0218854009227320.0437708018454640.978114599077268
310.01718534668290180.03437069336580370.982814653317098
320.01925896118380210.03851792236760430.980741038816198
330.01283395380115620.02566790760231240.987166046198844
340.008484613820603350.01696922764120670.991515386179397
350.007305373343641580.01461074668728320.992694626656358
360.004911772416412320.009823544832824650.995088227583588
370.00325279116521320.00650558233042640.996747208834787
380.002362955077232690.004725910154465380.997637044922767
390.001524242285843830.003048484571687650.998475757714156
400.0009462642886371140.001892528577274230.999053735711363
410.0005956514089634670.001191302817926930.999404348591037
420.0003478625337812180.0006957250675624370.999652137466219
430.0002435853957484130.0004871707914968260.999756414604252
440.0001398953560230470.0002797907120460940.999860104643977
457.86207430430635e-050.0001572414860861270.999921379256957
469.93624592464402e-050.0001987249184928800.999900637540754
470.0001770555102022180.0003541110204044350.999822944489798
480.0005667046996346880.001133409399269380.999433295300365
490.0003971702717912370.0007943405435824730.999602829728209
500.00442443954420870.00884887908841740.995575560455791
510.003213092094603190.006426184189206380.996786907905397
520.002302525490017350.004605050980034700.997697474509983
530.001522038839881410.003044077679762830.998477961160119
540.001203959137175370.002407918274350750.998796040862825
550.002043568652818310.004087137305636620.997956431347182
560.001638600734975790.003277201469951580.998361399265024
570.001108063847691460.002216127695382930.998891936152309
580.0009177396502502780.001835479300500560.99908226034975
590.0005992813382319050.001198562676463810.999400718661768
600.0004976246900264180.0009952493800528360.999502375309974
610.0005333292539051360.001066658507810270.999466670746095
620.0004005589657339790.0008011179314679580.999599441034266
630.001883418613539100.003766837227078210.998116581386461
640.001242047511616950.00248409502323390.998757952488383
650.001078898340910870.002157796681821750.99892110165909
660.001865922726562330.003731845453124670.998134077273438
670.001265699577933230.002531399155866470.998734300422067
680.0008555900400425570.001711180080085110.999144409959957
690.000564573422286360.001129146844572720.999435426577714
700.0003989118269954690.0007978236539909370.999601088173005
710.000301337008530650.00060267401706130.99969866299147
720.0001905515690503730.0003811031381007460.99980944843095
730.0001551923162215300.0003103846324430600.999844807683778
740.0003399272243440430.0006798544486880860.999660072775656
750.0002379529793958250.0004759059587916490.999762047020604
760.0001641717635065510.0003283435270131020.999835828236493
770.0001476131373634270.0002952262747268530.999852386862637
780.8957658792393660.2084682415212670.104234120760634
790.8715366858512110.2569266282975780.128463314148789
800.8490333155509440.3019333688981120.150966684449056
810.8323112900341440.3353774199317110.167688709965856
820.8046667089162570.3906665821674850.195333291083743
830.7683700562349550.4632598875300890.231629943765045
840.7301956164946120.5396087670107760.269804383505388
850.6871063667964660.6257872664070680.312893633203534
860.6601073097291170.6797853805417670.339892690270883
870.6388655254862420.7222689490275170.361134474513758
880.5911360082304440.8177279835391110.408863991769556
890.5499629715649270.9000740568701450.450037028435073
900.5183011772549850.963397645490030.481698822745015
910.5875639849710850.824872030057830.412436015028915
920.6624728769370750.6750542461258510.337527123062925
930.6436193350867920.7127613298264150.356380664913208
940.6215592958566430.7568814082867140.378440704143357
950.5793267053804570.8413465892390850.420673294619543
960.5848877520333630.8302244959332740.415112247966637
970.9985293041122510.002941391775497450.00147069588774873
980.9980213771074740.003957245785052370.00197862289252619
990.9985170006510730.002965998697853160.00148299934892658
1000.9982837914786680.003432417042663080.00171620852133154
1010.998854101659780.002291796680439730.00114589834021987
1020.9981292106475060.003741578704988060.00187078935249403
1030.997267212183810.005465575632379860.00273278781618993
1040.9984130108779180.003173978244163770.00158698912208188
1050.9983939826537140.003212034692572010.00160601734628601
1060.9973642960804380.005271407839123680.00263570391956184
1070.996165261126110.007669477747780480.00383473887389024
1080.9940588550979420.01188228980411550.00594114490205773
1090.9975460256149960.004907948770008090.00245397438500404
1100.9961538219466470.007692356106705080.00384617805335254
1110.9941325553037360.01173488939252700.00586744469626352
1120.9921052864862730.01578942702745440.0078947135137272
1130.9932340582816360.01353188343672740.00676594171836368
1140.990765940058310.01846811988337850.00923405994168925
1150.9852989887409020.02940202251819550.0147010112590977
1160.9805379969741470.03892400605170690.0194620030258534
1170.9858866361014660.02822672779706880.0141133638985344
1180.9887526181930240.02249476361395240.0112473818069762
1190.9949159742573210.01016805148535730.00508402574267863
1200.9909662490350180.01806750192996350.00903375096498175
1210.9891878786452530.02162424270949380.0108121213547469
1220.9937584734187650.01248305316247070.00624152658123534
1230.993789602467650.01242079506469970.00621039753234983
1240.9918706737564060.01625865248718710.00812932624359357
1250.9851177129020620.02976457419587610.0148822870979380
1260.9729650535536150.05406989289277080.0270349464463854
1270.9571885670548050.08562286589038970.0428114329451948
1280.9614714894150250.07705702116994970.0385285105849748
1290.9831762798304870.03364744033902650.0168237201695132
1300.9717961687261390.05640766254772260.0282038312738613
1310.950390500986620.09921899802676220.0496094990133811
1320.9062131232716430.1875737534567150.0937868767283573
1330.8469838480706590.3060323038586820.153016151929341
1340.7289845903779580.5420308192440830.271015409622042


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level550.436507936507937NOK
5% type I error level790.626984126984127NOK
10% type I error level880.698412698412698NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/109tu31292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/109tu31292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/1vjeu1292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/1vjeu1292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/2vjeu1292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/2vjeu1292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/3vjeu1292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/3vjeu1292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/45swx1292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/45swx1292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/55swx1292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/55swx1292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/65swx1292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/65swx1292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/7ykv01292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/7ykv01292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/89tu31292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/89tu31292061566.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/99tu31292061566.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t12920615639yf6wmxfgq3mrk4/99tu31292061566.ps (open in new window)


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