Home » date » 2010 » Nov » 23 »

Pop

*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 22:02:36 +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/t12905497188g8k2ge7hjdufet.htm/, Retrieved Tue, 23 Nov 2010 23:02:09 +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/t12905497188g8k2ge7hjdufet.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 «
1 14 23 23 26 26 9 9 15 15 6 6 11 11 13 13 4 4 1 18 21 21 20 20 9 9 15 15 6 6 12 12 16 16 4 4 1 11 21 21 21 21 9 9 14 14 13 13 15 15 19 19 6 6 0 12 21 0 31 0 14 0 10 0 8 0 10 0 15 0 8 0 1 16 24 24 21 21 8 8 10 10 7 7 12 12 14 14 8 8 1 18 22 22 18 18 8 8 12 12 9 9 11 11 13 13 4 4 1 14 21 21 26 26 11 11 18 18 5 5 5 5 19 19 4 4 1 14 22 22 22 22 10 10 12 12 8 8 16 16 15 15 5 5 1 15 21 21 22 22 9 9 14 14 9 9 11 11 14 14 5 5 1 15 20 20 29 29 15 15 18 18 11 11 15 15 15 15 8 8 0 17 22 0 15 0 14 0 9 0 8 0 12 0 16 0 4 0 1 19 21 21 16 16 11 11 11 11 11 11 9 9 16 16 4 4 0 10 21 0 24 0 14 0 11 0 12 0 11 0 16 0 4 0 1 18 23 23 17 17 6 6 17 17 8 8 15 15 17 17 4 4 0 14 22 0 19 0 20 0 8 0 7 0 12 0 15 0 4 0 0 14 23 0 22 0 9 0 16 0 9 0 16 0 15 0 8 0 1 17 22 22 31 31 10 10 21 21 12 12 14 14 20 20 4 4 0 14 24 0 28 0 8 0 24 0 20 0 11 0 18 0 4 0 1 16 23 23 38 38 11 11 21 21 7 7 10 10 16 16 4 4 0 18 21 0 26 0 14 0 14 0 8 0 7 0 16 0 4 0 1 14 23 23 25 25 11 11 7 7 8 8 11 11 19 19 8 8 1 12 23 23 25 25 16 16 18 18 16 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
Happiness[t] = + 7.80305927515177 + 17.4163705006130Pop[t] + 0.0579165349035982Age[t] -0.156072330488879Age_p[t] -0.0921950616972788Concern_over_mistakes[t] + 0.149224968338923Concern_over_mistakes_p[t] + 0.0116215720252558Doubts_about_actions[t] -0.44594773439194Doubts_about_actions_p[t] + 0.0441574359203689Parental_expectations[t] -0.00935434412190598Parental_expectations_p[t] + 0.0471039134932978Parental_criticism[t] -0.194860597403451Parental_criticism_p[t] + 0.151966046354645Popularity[t] -0.265853714177041Popularity_p[t] + 0.275841334364272Perceived_learning_competence[t] -0.419494182412067Perceived_learning_competence_p[t] -0.059154172572458Amotivation[t] -0.09235574763941Amotivation_p[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.803059275151773.8552832.0240.0450860.022543
Pop17.41637050061305.1398773.38850.0009380.000469
Age0.05791653490359820.0807710.7170.4746720.237336
Age_p-0.1560723304888790.120191-1.29850.1964750.098238
Concern_over_mistakes-0.09219506169727880.057377-1.60680.1105940.055297
Concern_over_mistakes_p0.1492249683389230.076321.95520.0527680.026384
Doubts_about_actions0.01162157202525580.1161380.10010.9204510.460225
Doubts_about_actions_p-0.445947734391940.156561-2.84840.0051330.002567
Parental_expectations0.04415743592036890.1130910.39050.6968570.348429
Parental_expectations_p-0.009354344121905980.144955-0.06450.9486480.474324
Parental_criticism0.04710391349329780.1445180.32590.7450120.372506
Parental_criticism_p-0.1948605974034510.176933-1.10130.2728550.136427
Popularity0.1519660463546450.0972261.5630.1205570.060278
Popularity_p-0.2658537141770410.128616-2.0670.0407790.02039
Perceived_learning_competence0.2758413343642720.1366372.01880.0456310.022816
Perceived_learning_competence_p-0.4194941824120670.182803-2.29480.0233990.011699
Amotivation-0.0591541725724580.171926-0.34410.7313690.365684
Amotivation_p-0.092355747639410.190163-0.48570.6280480.314024


Multiple Linear Regression - Regression Statistics
Multiple R0.551151442308679
R-squared0.303767912358937
Adjusted R-squared0.209831837042285
F-TEST (value)3.2337726622595
F-TEST (DF numerator)17
F-TEST (DF denominator)126
p-value7.93946563379944e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.11904678725665
Sum Squared Residuals565.785270109425


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11416.4449038106865-2.44490381068653
21815.75418975004162.24581024995843
31113.6664783894794-2.66647838947938
41212.3264143694462-0.326414369446192
51615.31057230463970.689427695360279
61815.97346718837962.02653281162036
71415.846137955077-1.84613795507701
81414.4724372187036-0.472437218703563
91515.6398598635021-0.639859863502078
101512.32123375077932.67876624922068
111714.63168457294932.36831542705073
121914.12108501546424.87891498453579
131013.8687769622295-3.86877696222945
141815.97854389030782.02145610969221
151413.96553107453380.0344689254662466
161414.437739941546-0.437739941545996
171714.36892848464162.63107151535841
181415.1065775316393-1.10657753163932
191616.0046013562127-0.00460135621266727
201813.02057930720424.97942069279577
211413.47732670796940.522673292030594
221211.80887224766300.19112775233703
231713.89853721256333.10146278743668
24914.7711227710924-5.77112277109235
251615.56823217045950.431767829540484
261412.96071274552221.03928725447783
271113.5753866236095-2.57538662360950
281616.531157979698-0.531157979697993
291312.21862719043230.781372809567731
301715.05240522924971.94759477075034
311515.6822476121662-0.682247612166205
321414.2757627709241-0.275762770924058
331611.45101071378834.54898928621168
34911.6206886344894-2.62068863448942
351513.07389964674141.92610035325862
361716.39449502102180.605504978978197
371313.9194452468857-0.919445246885724
381514.27567634907100.724323650929016
391615.29744978416820.702550215831777
401616.0659978482457-0.065997848245705
411213.3956435702274-1.39564357022737
421113.3647940920151-2.36479409201511
431515.1253136743861-0.125313674386131
441715.08085446603651.91914553396351
451314.1074912214962-1.10749122149620
461612.16241043182253.83758956817754
471412.88788266080251.11211733919750
481112.1390467713564-1.13904677135642
491212.6918401028865-0.691840102886545
501212.0617611816134-0.0617611816133956
511514.39588188111730.604118118882706
521616.1805457428282-0.180545742828208
531515.338190943667-0.338190943666999
541214.3182556186467-2.31825561864671
551214.5678023348977-2.56780233489766
56812.0913631046910-4.09136310469096
571313.9499996294482-0.949999629448203
581114.1719838671055-3.17198386710553
591416.2529809586942-2.25298095869415
601513.19057014311041.80942985688959
611012.4709057739645-2.47090577396451
621112.4483158070715-1.44831580707154
631214.2276371013400-2.22763710133998
641514.46383338172660.536166618273435
651514.54450397698900.455496023011029
661413.71415053166150.285849468338474
671612.69061722828053.30938277171949
681515.0593256490364-0.0593256490363937
691514.34204066500570.657959334994292
701314.6631598442056-1.66315984420558
711714.77094820121462.22905179878537
721312.71789682462130.282103175378710
731511.74654016241243.25345983758762
741314.3599790923522-1.35997909235220
751514.84872234709410.151277652905856
761614.67293773564151.32706226435852
771514.40675364828020.59324635171983
781613.35963100796742.64036899203256
791513.95833414811881.04166585188117
801414.3193755762845-0.319375576284458
811512.44951588266182.55048411733815
82711.0743902824004-4.07439028240037
831716.33952733444720.660472665552797
841314.6977416730483-1.69774167304829
851513.84477200944661.15522799055341
861414.0112754708934-0.0112754708934258
871313.4775057303095-0.477505730309453
881616.3508300171744-0.350830017174373
891213.8147797415958-1.81477974159582
901415.2288173552706-1.22881735527064
911712.50936830515984.49063169484016
921514.09483191572200.905168084277952
931713.13721092623093.8627890737691
941214.4642925657112-2.46429256571117
951615.07341274861210.926587251387942
961113.5846150084969-2.58461500849692
971512.69628567138242.30371432861762
98913.1475683942831-4.14756839428309
991614.32073742512181.67926257487817
1001011.8142033109291-1.81420331092914
1011012.6928516973584-2.69285169735840
1021515.0703700173387-0.0703700173386514
1031113.4967130072771-2.49671300727713
1041315.4086513356288-2.40865133562876
1051414.2477323247196-0.247732324719573
1061815.37573565939522.62426434060484
1071614.69977336661571.30022663338427
1081412.91458083360051.08541916639951
1091415.3577004055355-1.35770040553550
1101413.88257395531110.117426044688885
1111415.4281010931093-1.42810109310932
1121213.7535048654012-1.75350486540121
1131413.48112299437650.518877005623528
1141515.7405108149539-0.740510814953864
1151514.95388520514910.0461147948509387
1161313.8076319769972-0.807631976997153
1171714.96335094813692.03664905186309
1181715.78305564439501.21694435560503
1191915.32728619659983.67271380340016
1201514.41127365770840.588726342291602
1211313.3930813795265-0.393081379526461
122911.0329011410282-2.03290114102822
1231515.4803261391011-0.480326139101051
1241514.24089724154090.759102758459076
1251614.66983478453641.33016521546355
1261111.9532693758456-0.953269375845617
1271413.66331505087080.33668494912919
1281112.9528328761856-1.95283287618557
1291515.5498237842772-0.54982378427716
1301312.06106736788350.938932632116483
1311613.81020431135002.18979568865003
1321415.2203160934167-1.22031609341668
1331514.55166318244480.448336817555191
1341615.15764354468340.842356455316636
1351614.84708289625931.15291710374066
1361111.9896549580181-0.98965495801812
1371314.3663242279658-1.36632422796584
1381615.56823217045950.431767829540484
1391213.1734417187557-1.17344171875566
140911.4050765582403-2.40507655824028
1411311.67864202113171.32135797886827
1421314.6977416730483-1.69774167304829
1431915.32728619659983.67271380340016
1441315.8422351949844-2.84223519498437


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.9433012444284470.1133975111431060.0566987555715528
220.984232961607750.03153407678449960.0157670383922498
230.9712399975003620.05752000499927640.0287600024996382
240.9869533910977730.02609321780445470.0130466089022273
250.9754345407971410.04913091840571730.0245654592028586
260.9718670290099810.05626594198003730.0281329709900187
270.9602285801112340.07954283977753220.0397714198887661
280.944334406232630.1113311875347400.0556655937673699
290.9249285637676150.150142872464770.075071436232385
300.927886596101350.1442268077973010.0721134038986507
310.8961189504524770.2077620990950460.103881049547523
320.9055080511102530.1889838977794940.094491948889747
330.963372050408920.07325589918216090.0366279495910804
340.9509468618768970.09810627624620640.0490531381231032
350.9475608902004730.1048782195990550.0524391097995274
360.9288688996448770.1422622007102470.0711311003551234
370.927816263811960.1443674723760810.0721837361880405
380.9258873215226120.1482253569547750.0741126784773877
390.9030133498846830.1939733002306340.0969866501153168
400.8729608514969630.2540782970060740.127039148503037
410.8584022385394620.2831955229210760.141597761460538
420.878059936128330.2438801277433410.121940063871671
430.8470172011270690.3059655977458630.152982798872931
440.8335102192958580.3329795614082840.166489780704142
450.8162199829286940.3675600341426130.183780017071306
460.8354562661838680.3290874676322640.164543733816132
470.802191974471960.395616051056080.19780802552804
480.8745199561285450.2509600877429100.125480043871455
490.8444575996803250.3110848006393500.155542400319675
500.814369902427590.3712601951448200.185630097572410
510.7743159277875880.4513681444248230.225684072212412
520.7373908497845390.5252183004309220.262609150215461
530.692803746175280.6143925076494410.307196253824720
540.696157384791180.6076852304176380.303842615208819
550.7060370150823250.587925969835350.293962984917675
560.82590811964240.3481837607152010.174091880357601
570.8075400620794630.3849198758410740.192459937920537
580.8383194923525990.3233610152948020.161680507647401
590.8551077171052860.2897845657894280.144892282894714
600.8848997863447640.2302004273104710.115100213655236
610.8878282556269770.2243434887460460.112171744373023
620.8952591403530080.2094817192939840.104740859646992
630.8876644147528070.2246711704943860.112335585247193
640.8625902774170470.2748194451659050.137409722582953
650.8374196070930230.3251607858139530.162580392906977
660.8100126392510430.3799747214979140.189987360748957
670.861652004086840.276695991826320.13834799591316
680.8315272596908850.3369454806182300.168472740309115
690.8222681571077770.3554636857844460.177731842892223
700.8241561427762440.3516877144475130.175843857223756
710.841850491132950.31629901773410.15814950886705
720.8095860821289860.3808278357420290.190413917871014
730.8750901179973940.2498197640052120.124909882002606
740.8812715671150050.2374568657699910.118728432884995
750.8533246636574920.2933506726850160.146675336342508
760.8335720385521040.3328559228957910.166427961447896
770.7991604915235750.401679016952850.200839508476425
780.809983766126440.3800324677471190.190016233873559
790.7804944270137270.4390111459725460.219505572986273
800.7377267728993240.5245464542013520.262273227100676
810.7821472879416740.4357054241166520.217852712058326
820.858867014132980.282265971734040.14113298586702
830.8271059751775220.3457880496449570.172894024822478
840.8126411226349960.3747177547300080.187358877365004
850.7860139415030250.427972116993950.213986058496975
860.7423970627933080.5152058744133840.257602937206692
870.6965791258207160.6068417483585670.303420874179284
880.647564144491690.7048717110166190.352435855508309
890.6281053380254150.743789323949170.371894661974585
900.592380952083880.8152380958322410.407619047916121
910.7450308992730560.5099382014538880.254969100726944
920.7027863223360790.5944273553278420.297213677663921
930.8584588802218330.2830822395563340.141541119778167
940.8605099241955280.2789801516089440.139490075804472
950.856440192061290.2871196158774220.143559807938711
960.8773990107295290.2452019785409430.122600989270471
970.9287117538097920.1425764923804150.0712882461902077
980.9677276348798420.06454473024031610.0322723651201580
990.9716577801676880.0566844396646240.028342219832312
1000.9626805798776330.07463884024473430.0373194201223672
1010.9556781207496450.08864375850070980.0443218792503549
1020.9371792517030540.1256414965938920.0628207482969459
1030.9385866742369670.1228266515260660.0614133257630328
1040.9693595274093020.06128094518139610.0306404725906981
1050.9625880498322290.07482390033554260.0374119501677713
1060.9527226689368450.09455466212631050.0472773310631553
1070.953382925244350.09323414951129920.0466170747556496
1080.9809816434469630.03803671310607480.0190183565530374
1090.9722424526666770.05551509466664590.0277575473333230
1100.9839387466523550.03212250669528930.0160612533476447
1110.9779439104592170.0441121790815660.022056089540783
1120.973593313836820.05281337232636090.0264066861631805
1130.9789401090439860.04211978191202720.0210598909560136
1140.968962314577320.06207537084535980.0310376854226799
1150.9464983862819950.1070032274360100.0535016137180052
1160.9133335638267610.1733328723464780.0866664361732388
1170.9037758753219150.1924482493561710.0962241246780853
1180.9557249969657570.08855000606848630.0442750030342432
1190.9437896556973620.1124206886052760.0562103443026379
1200.956745435624260.0865091287514790.0432545643757395
1210.9114055491364280.1771889017271440.0885944508635718
1220.8257381738390690.3485236523218620.174261826160931
1230.6797980549888130.6404038900223730.320201945011187


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


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


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


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


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


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


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


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


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


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


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