Home » date » 2010 » Dec » 24 »

*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: Fri, 24 Dec 2010 15:12:46 +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/24/t1293203437ryi04l4hmoqwf4c.htm/, Retrieved Fri, 24 Dec 2010 16:10:49 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c.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 «
15 10 12 16 6 2 0 0 12 9 7 12 6 1 1 2 9 12 11 11 4 1 2 1 10 12 11 12 6 0 0 0 13 9 14 14 6 0 0 0 16 11 16 16 7 1 0 0 14 12 13 13 6 0 0 0 16 11 13 14 7 1 1 0 10 12 5 13 6 0 0 0 8 12 8 13 4 2 0 1 12 11 14 13 5 1 0 0 15 11 15 15 8 0 0 0 14 12 8 14 4 0 1 0 14 6 13 12 6 1 1 2 12 13 12 12 6 1 2 1 12 11 11 12 5 0 0 0 10 12 8 11 4 0 0 0 4 10 4 10 2 0 0 0 14 11 15 15 8 0 1 0 15 12 12 16 7 0 0 0 16 12 14 14 6 0 0 0 12 12 9 13 4 0 1 0 12 11 16 13 4 0 0 0 12 12 10 13 4 0 0 1 12 12 8 13 5 1 0 1 12 12 14 14 4 0 0 0 11 6 6 9 4 3 2 1 11 5 16 14 6 1 0 0 11 12 11 12 6 1 1 0 11 14 7 13 6 1 1 0 11 12 13 11 4 3 1 1 11 9 7 13 2 0 0 0 15 11 14 15 7 0 0 0 15 11 17 16 6 0 0 0 9 11 15 15 7 0 0 0 16 12 8 14 4 0 0 0 13 10 8 8 4 0 2 1 9 12 11 11 4 1 0 0 16 11 16 15 6 0 0 0 12 12 10 15 6 0 0 0 15 9 5 11 3 0 0 2 5 15 8 12 3 0 0 0 11 11 8 12 6 2 2 0 17 11 15 14 5 2 2 0 9 15 6 8 4 0 1 1 13 12 16 16 6 0 0 0 16 9 16 16 6 0 0 0 16 12 16 14 6 0 0 0 14 9 19 12 6 2 0 2 16 11 14 15 6 1 0 0 11 12 15 1 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 time12 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Popularity[t] = -0.340957140032500 + 0.117850045256176FindingFriends[t] + 0.240882362067202KnowingPeople[t] + 0.372073239661235Liked[t] + 0.610915345027388Celebrity[t] -0.0436536294476873B[t] + 0.171832293382581`2B`[t] + 0.50219147193765`3B`[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.3409571400325001.464149-0.23290.8161840.408092
FindingFriends0.1178500452561760.0963741.22280.2233350.111668
KnowingPeople0.2408823620672020.0616043.91020.000147e-05
Liked0.3720732396612350.0968583.84140.0001819e-05
Celebrity0.6109153450273880.1563353.90770.0001417.1e-05
B-0.04365362944768730.223131-0.19560.8451590.42258
`2B`0.1718322933825810.2685430.63990.5232480.261624
`3B`0.502191471937650.31641.58720.11460.0573


Multiple Linear Regression - Regression Statistics
Multiple R0.71619317008086
R-squared0.512932656870471
Adjusted R-squared0.489895687938669
F-TEST (value)22.265631315862
F-TEST (DF numerator)7
F-TEST (DF denominator)148
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.09738583856901
Sum Squared Residuals651.056048662812


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11513.25948830318441.74051169681562
21211.66880235565280.331197644347162
3911.0616188314191-2.06161883141909
41011.8533203318800-1.85332033187998
51312.96656376163550.0334362383644692
61614.99543677118451.00456322881554
71412.70715829567561.29284170432438
81613.70047549904302.29952450095704
91010.780099399138-0.780099399138003
10810.6958000083271-2.69580000832711
111212.1756216380116-0.175621638011571
121515.0370501439311-0.0370501439310947
131410.82482132832863.17517867167135
141412.76054639228751.23945360771248
151213.0142551684585-1.01425516845848
161211.12455494159640.875445058403584
17109.536769315962360.463230684037638
1846.74363584746519-2.74363584746519
191415.2088824373137-1.20888243731368
201514.19341099761950.806589002380489
211613.32011389740412.67988610259594
221210.69363045073461.30636954926538
231212.0901246465663-0.0901246465662739
241211.26487199135690.735128008643113
251211.35036898280220.649631017197816
261212.0982832073493-0.0982832073492803
27118.318653011328182.68134698867182
281112.9332746752975-1.93327467529754
291111.9814989958149-0.981498995814874
301111.6257428777197-0.625742877719652
311111.2842440032755-0.284244003275542
32118.464652607394332.53534739260567
331514.18525243683650.814747563163496
341514.66905741767200.330942582328042
35914.4261347989037-5.42613479890371
361610.65298903494615.34701096505393
37139.030705565169123.96929443483088
38910.2157627727163-1.21576277271628
391614.05610181594351.94389818405648
401212.7286576887965-0.728657688796484
41158.854039692840146.14596030715986
4259.65147734636474-4.65147734636474
431111.2691805282920-0.269180528291986
441713.08858819705753.91141180294252
4598.966358773933010.0336412260669887
461314.5460251008609-1.54602510086093
471614.19247496509241.80752503490760
481613.80187862153852.19812137846154
491414.343904777629-0.343904777628995
501613.53068346236142.46931653763857
511112.8168497801488-1.81684978014879
521111.8687014209189-0.868701420918887
531113.7292333448507-2.72923334485071
541212.2305758430961-0.230575843096066
551213.8192931556826-1.81929315568257
561212.0829021183104-0.0829021183103742
571413.70552796940310.294472030596851
581010.9193976374449-0.919397637444866
5999.39051061781011-0.390510617810114
601212.2715659514931-0.271565951493069
611010.0318748724346-0.031874872434624
621412.98288088320151.01711911679846
6389.94996681078992-1.94996681078992
641614.50033121471221.49966878528781
651415.7231004033153-1.72310040331527
661410.75452195863623.24547804136377
671211.24444524355360.755554756446359
681413.39949258476740.600507415232604
69711.1327091568048-4.13270915680476
701913.93306949913255.0669305008675
711512.84242968667172.15757031332825
72811.2639043799735-3.26390437997346
731014.2866196349010-4.28661963490102
741312.95934123337960.0406587666203699
751311.23314466791681.76685533208317
761010.3937492946118-0.393749294611803
77129.0570448485292.94295515147099
781517.3038760808146-2.30387608081458
79711.0644184649571-4.06441846495707
801414.1872926935376-0.187292693537553
81108.433890429316511.56610957068349
8269.70389833189643-3.70389833189643
831111.2566306516474-0.25663065164738
84129.295886953895162.70411304610484
851414.1933059636853-0.193305963685324
861213.3232559122579-1.32325591225786
871414.3031024820927-0.30310248209268
881110.06587294212990.934127057870083
89109.272825797876370.727174202123635
901313.3323820844243-0.332382084424296
91810.2727572345018-2.27275723450183
92911.7375105433249-2.73751054332485
93612.0912264047190-6.09122640471903
941213.1881631426699-1.18816314266988
951412.21409299590441.78590700409559
961110.51882186812390.481178131876121
97810.6256841059207-2.62568410592072
9879.29792721059621-2.29792721059621
99910.5302990994509-1.53029909945087
1001412.18076798513541.81923201486456
1011310.27887553858382.72112446141622
1021512.70715829567562.29284170432438
10355.35466983018372-0.354669830183719
1041512.26014667249882.73985332750122
1051312.26807524403080.731924755969187
1061211.62484276962350.375157230376472
10767.7895202723255-1.78952027232549
10879.6679601935564-2.66796019355640
109138.57528012439464.4247198756054
1101614.92434644579881.07565355420121
1111013.3334547297419-3.33345472974191
1121615.15694044588830.84305955411168
1131513.19410529136491.80589470863513
11488.43074841446271-0.430748414462713
1151112.6098716110132-1.6098716110132
1161313.2430819236266-0.243081923626609
1171615.23631913325170.763680866748342
118118.711653273543492.28834672645651
1191414.4404116637687-0.440411663768671
120910.2414724804339-1.24147248043391
121810.2881383235407-2.28813832354073
122811.1352322528836-3.13523225288359
1231111.9044264788345-0.904426478834538
1241213.3284381838127-1.32843818381271
1251111.0872496054817-0.0872496054816573
1261414.6275200122560-0.627520012255971
1271112.7034912388105-1.70349123881052
1281412.32896675193241.67103324806757
1291314.7677542830899-1.76775428308994
1301210.78213965583911.21786034416095
13145.97909173317461-1.97909173317461
1321512.93514239477712.06485760522290
1331011.3971355142685-1.39713551426854
1341313.8895925253750-0.889592525374987
1351514.21179314314700.788206856852951
1361213.2757008911194-1.27570089111944
1371313.3201138974041-0.320113897404057
13887.922467751278240.0775322487217605
1391010.5697598234316-0.569759823431602
1401513.68402857628231.31597142371771
1411614.43225310298571.56774689701434
1421614.91605808382111.08394191617888
1431412.97472232241851.02527767758146
1441413.08848750869800.911512491302045
1451210.66632552170931.33367447829073
1461513.13310874952911.86689125047093
1471312.86816850722450.131831492775490
1481613.20226385214792.79773614785212
1491413.56099625947130.439003740528741
150810.0318748724346-2.03187487243462
1511613.73282855285382.26717144714616
1521615.91646120265380.0835387973461524
1531213.1889230198100-1.18892301981002
1541112.2919572751686-1.29195727516855
1551615.91646120265380.0835387973461524
156910.0318748724346-1.03187487243462


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2840513070910870.5681026141821740.715948692908913
120.2457274305432190.4914548610864380.754272569456781
130.2935317304570600.5870634609141190.70646826954294
140.2003018737947210.4006037475894410.79969812620528
150.1224710368793900.2449420737587800.87752896312061
160.1002419369371130.2004838738742250.899758063062887
170.07879206151117580.1575841230223520.921207938488824
180.1224048011950320.2448096023900640.877595198804968
190.2177266601156100.4354533202312190.78227333988439
200.1577057406009700.3154114812019410.84229425939903
210.1807291439095940.3614582878191870.819270856090406
220.1321832181332520.2643664362665030.867816781866748
230.1003987626602400.2007975253204810.89960123733976
240.06930459153980210.1386091830796040.930695408460198
250.05245507478610040.1049101495722010.9475449252139
260.03998448514109970.07996897028219940.9600155148589
270.05982728967855180.1196545793571040.940172710321448
280.1178735329871690.2357470659743380.882126467012831
290.09246157806238270.1849231561247650.907538421937617
300.07104352959192710.1420870591838540.928956470408073
310.0511602099616230.1023204199232460.948839790038377
320.04454484884942410.08908969769884820.955455151150576
330.03142902060326360.06285804120652720.968570979396736
340.02216364476243670.04432728952487340.977836355237563
350.1826738919482340.3653477838964680.817326108051766
360.3705203648080770.7410407296161530.629479635191923
370.5173778243320250.965244351335950.482622175667975
380.4631289927425790.9262579854851580.536871007257421
390.4482166639040030.8964333278080060.551783336095997
400.4108217466281990.8216434932563980.589178253371801
410.675437076118110.649125847763780.32456292388189
420.830483698875890.339032602248220.16951630112411
430.7946273857631240.4107452284737510.205372614236876
440.838687943829510.3226241123409800.161312056170490
450.814755412473980.370489175052040.18524458752602
460.8077664083620640.3844671832758720.192233591637936
470.7825481254913090.4349037490173830.217451874508691
480.800990880896770.3980182382064620.199009119103231
490.7630958502563520.4738082994872960.236904149743648
500.7809732054572250.4380535890855490.219026794542775
510.7570828513428720.4858342973142550.242917148657128
520.7321281805703040.5357436388593910.267871819429696
530.8403124058603430.3193751882793150.159687594139657
540.8076390699931140.3847218600137710.192360930006886
550.8043798498775380.3912403002449240.195620150122462
560.77127525408340.4574494918332010.228724745916601
570.7322689508882160.5354620982235690.267731049111784
580.6921927010732370.6156145978535260.307807298926763
590.6611949642196630.6776100715606740.338805035780337
600.6433113428930940.7133773142138130.356688657106906
610.5964181571424360.8071636857151290.403581842857564
620.5560133331433990.8879733337132030.443986666856601
630.5429678890448060.9140642219103890.457032110955194
640.5292851376708530.9414297246582930.470714862329147
650.5320173967770.9359652064460.467982603223
660.5968133150499070.8063733699001860.403186684950093
670.5532894513104870.8934210973790270.446710548689513
680.5116457742740710.9767084514518580.488354225725929
690.6839114001164170.6321771997671660.316088599883583
700.848082731355090.3038345372898190.151917268644909
710.844598726118960.3108025477620790.155401273881040
720.8808292609344460.2383414781311090.119170739065554
730.9454596824360790.1090806351278420.0545403175639212
740.9312099104029040.1375801791941920.0687900895970959
750.9235405327072720.1529189345854550.0764594672927276
760.9050119512939370.1899760974121270.0949880487060633
770.9241349385126810.1517301229746380.0758650614873191
780.9317678125115980.1364643749768040.068232187488402
790.97124565850680.05750868298639910.0287543414931995
800.9625274671320670.07494506573586620.0374725328679331
810.9593974388991410.08120512220171730.0406025611008586
820.9797051446163380.04058971076732320.0202948553836616
830.973666123004190.05266775399161970.0263338769958098
840.9791181395630390.04176372087392270.0208818604369614
850.972288022389230.05542395522153760.0277119776107688
860.9670708537587190.06585829248256160.0329291462412808
870.957814810369910.08437037926017770.0421851896300888
880.9511040661060440.09779186778791180.0488959338939559
890.9516855595562560.09662888088748740.0483144404437437
900.938127153953440.1237456920931220.0618728460465608
910.9410026323095040.1179947353809910.0589973676904957
920.9527353182989620.09452936340207680.0472646817010384
930.9968950063498530.006209987300294960.00310499365014748
940.9958810072582830.008237985483433270.00411899274171663
950.9949413905061840.01011721898763290.00505860949381644
960.9930795418705080.01384091625898370.00692045812949183
970.9939875353361270.01202492932774680.00601246466387342
980.9948442675966450.01031146480671030.00515573240335515
990.9931271326299450.01374573474010990.00687286737005497
1000.9916944149210740.01661117015785230.00830558507892614
1010.9944739814812460.01105203703750880.00552601851875441
1020.9944065583936220.01118688321275620.00559344160637809
1030.9922180145469870.01556397090602700.00778198545301349
1040.9940193490865440.01196130182691190.00598065091345593
1050.9914414151599860.01711716968002760.00855858484001379
1060.9884976720190680.02300465596186440.0115023279809322
1070.9874000620072170.02519987598556680.0125999379927834
1080.9916348936101550.01673021277969010.00836510638984506
1090.9990742125568930.001851574886214410.000925787443107207
1100.9986736658839450.002652668232110510.00132633411605526
1110.999674868586870.0006502628262589550.000325131413129477
1120.99945648642950.001087027141001300.000543513570500648
1130.9993436298931770.001312740213645110.000656370106822554
1140.9989754615559670.00204907688806510.00102453844403255
1150.9986270489713470.002745902057305670.00137295102865283
1160.9977570611484650.004485877703069730.00224293885153487
1170.9964279138710570.007144172257886330.00357208612894317
1180.9992333991097250.001533201780549840.000766600890274918
1190.9987893168959240.00242136620815170.00121068310407585
1200.9980921584709710.003815683058057470.00190784152902874
1210.997992595896960.004014808206080180.00200740410304009
1220.997978160995370.004043678009258350.00202183900462917
1230.9970821621271550.005835675745690920.00291783787284546
1240.9977114061699920.00457718766001690.00228859383000845
1250.9961340919411210.007731816117757050.00386590805887853
1260.9944263725793750.01114725484124980.0055736274206249
1270.9921941278439470.01561174431210680.00780587215605341
1280.9884918597472520.02301628050549670.0115081402527483
1290.9946880083040490.01062398339190300.00531199169595151
1300.9965526335259740.006894732948052520.00344736647402626
1310.9946172017642430.01076559647151410.00538279823575704
1320.9939579230037450.01208415399251080.00604207699625539
1330.9908062643273140.01838747134537290.00919373567268646
1340.984022989872550.03195402025489920.0159770101274496
1350.97216222181080.05567555637839880.0278377781891994
1360.9685428303495940.06291433930081140.0314571696504057
1370.957352787623810.08529442475238120.0426472123761906
1380.9348351312284410.1303297375431190.0651648687715593
1390.9214788773628450.1570422452743110.0785211226371553
1400.8719298623118080.2561402753763840.128070137688192
1410.8771148550214550.2457702899570890.122885144978545
1420.8028541270320570.3942917459358850.197145872967943
1430.7355167901754820.5289664196490360.264483209824518
1440.7136128486298260.5727743027403480.286387151370174
1450.5809099273333180.8381801453333650.419090072666682


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level200.148148148148148NOK
5% type I error level450.333333333333333NOK
10% type I error level610.451851851851852NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/10jb8p1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/10jb8p1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/1uabe1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/1uabe1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/2njsz1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/2njsz1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/3njsz1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/3njsz1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/4njsz1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/4njsz1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/5gar21293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/5gar21293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/6gar21293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/6gar21293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/7qj8m1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/7qj8m1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/8qj8m1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/8qj8m1293203553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/9jb8p1293203553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293203437ryi04l4hmoqwf4c/9jb8p1293203553.ps (open in new window)


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