Home » date » 2010 » Nov » 23 »

Mini-tutorial Interaction effect Gender

*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 11:55:50 +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/t1290513279f66e4263rxosqgx.htm/, Retrieved Tue, 23 Nov 2010 12:54:43 +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/t1290513279f66e4263rxosqgx.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 «
0 69 26 0 9 0 15 0 6 0 25 0 25 0 1 53 20 20 9 9 15 15 6 6 25 25 24 24 1 43 21 21 9 9 14 14 13 13 19 19 21 21 0 60 31 0 14 0 10 0 8 0 18 0 23 0 1 49 21 21 8 8 10 10 7 7 18 18 17 17 1 62 18 18 8 8 12 12 9 9 22 22 19 19 1 45 26 26 11 11 18 18 5 5 29 29 18 18 1 50 22 22 10 10 12 12 8 8 26 26 27 27 1 75 22 22 9 9 14 14 9 9 25 25 23 23 1 82 29 29 15 15 18 18 11 11 23 23 23 23 0 60 15 0 14 0 9 0 8 0 23 0 29 0 1 59 16 16 11 11 11 11 11 11 23 23 21 21 1 21 24 24 14 14 11 11 12 12 24 24 26 26 1 62 17 17 6 6 17 17 8 8 30 30 25 25 0 54 19 0 20 0 8 0 7 0 19 0 25 0 1 47 22 22 9 9 16 16 9 9 24 24 23 23 1 59 31 31 10 10 21 21 12 12 32 32 26 26 0 37 28 0 8 0 24 0 20 0 30 0 20 0 0 43 38 0 11 0 21 0 7 0 29 0 29 0 1 48 26 26 14 14 14 14 8 8 17 17 24 24 0 79 25 0 11 0 7 0 8 0 25 0 23 0 0 62 25 0 16 0 18 0 16 0 26 0 24 0 1 16 29 29 14 14 18 18 10 10 26 26 30 30 0 38 28 0 11 0 13 0 6 0 25 0 22 0 1 58 15 15 11 11 11 11 8 8 23 23 22 22 0 60 18 0 12 0 13 0 9 0 21 0 13 0 0 67 21 0 9 0 13 0 9 0 19 0 24 0 0 55 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 time10 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Anxiety[t] = + 72.6760102555913 -18.2843507953355Gender[t] -0.0886231903464793Concern[t] -0.397485256901703Concern_G[t] -0.603213979753444Doubts[t] + 1.07713437867055Doubts_G[t] -0.0391215489632878Expectations[t] + 1.21866622210472Expectations_G[t] -0.139015564284004Criticism[t] -1.39668931547673Criticism_G[t] -0.615310967424411Perstandards[t] + 1.19279724420671Perstandards_G[t] + 0.248985111510631Organization[t] -0.877901085869994Organization_G[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)72.676010255591314.7730114.91952e-061e-06
Gender-18.284350795335518.840008-0.97050.3334920.166746
Concern-0.08862319034647930.391181-0.22660.8211070.410553
Concern_G-0.3974852569017030.500598-0.7940.4285460.214273
Doubts-0.6032139797534440.724333-0.83280.4064050.203202
Doubts_G1.077134378670550.9191251.17190.2432510.121626
Expectations-0.03912154896328780.680796-0.05750.9542580.477129
Expectations_G1.218666222104720.846321.440.1521440.076072
Criticism-0.1390155642840040.845179-0.16450.8695930.434797
Criticism_G-1.396689315476731.054501-1.32450.1875260.093763
Perstandards-0.6153109674244110.521018-1.1810.2396420.119821
Perstandards_G1.192797244206710.6511051.8320.0691140.034557
Organization0.2489851115106310.4643720.53620.59270.29635
Organization_G-0.8779010858699940.6355-1.38140.1693780.084689


Multiple Linear Regression - Regression Statistics
Multiple R0.347149841668879
R-squared0.120513012570728
Adjusted R-squared0.0376627891172459
F-TEST (value)1.45458886587545
F-TEST (DF numerator)13
F-TEST (DF denominator)138
p-value0.14242126291324
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation13.1720315014651
Sum Squared Residuals23943.3331148311


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16954.363818470803914.6361815291961
25356.756888459036-3.75688845903594
34342.76313144270540.236868557294558
46054.63141578550245.36858421449755
54948.72343925044220.276560749557806
66250.521557337358611.4784426626414
74565.9458584258515-20.9458584258515
85048.33928653821511.66071346178488
97550.626928226475324.3730717735247
108250.559487868720331.4405121312797
116054.50586421195115.49413578804887
125947.98423532400711.015764675993
132141.4143304679976-20.4143304679976
146258.33964760034273.66035239965732
155452.1755281089471.82447189105304
164752.4085312959759-5.40853129597586
175952.53122668726466.46877331273542
183748.1699938345437-11.1699938345437
194350.2548639454205-7.25486394542053
204847.33899512321110.661004876788916
217952.782984741760626.2170152582394
226247.858127434211414.1418725657886
231648.9513193593953-32.9513193593953
243852.3114318939989-14.3114318939989
255852.4485424361785.551457563822
266052.39778099096027.60221900903984
276757.91101152064689.08898847935319
285546.70143658601838.29856341398165
294743.33555310056023.66444689943983
305955.94642197149143.0535780285086
314946.9489948549052.05100514509504
324757.1243962700847-10.1243962700847
335746.183373321146210.8166266788538
343951.792204054069-12.792204054069
354947.34573173872061.65426826127944
362642.6400335417166-16.6400335417166
375351.41528311454281.58471688545724
387557.419891160246617.5801088397534
396546.87470502813318.125294971867
404959.9868724580845-10.9868724580845
414849.6619347117771-1.66193471177712
424549.2481068182347-4.2481068182347
433155.4207386664032-24.4207386664032
446157.85393643085923.14606356914077
454954.7525815985101-5.75258159851009
466949.468077983866119.5319220161339
475450.11700807825353.88299192174652
488059.082882444903320.9171175550967
495752.55783039169664.4421696083034
503451.6337692068881-17.6337692068881
516959.35195680368429.6480431963158
524448.5058719132579-4.50587191325787
537057.097734655060512.9022653449395
545159.6312421533678-8.63124215336784
556650.013001992701115.9869980072989
561845.3696024007475-27.3696024007475
577448.903704792790525.0962952072095
585955.3738936962943.62610630370595
594857.467058825437-9.46705882543698
605552.19157488780962.80842511219037
614449.3027241198105-5.30272411981049
625650.81832555132815.18167444867189
636556.72857532470218.27142467529785
647755.318677861108821.6813221388912
654644.96606248973091.03393751026914
667055.477056105384614.5229438946154
673954.0082059736741-15.0082059736741
685556.1357794838725-1.13577948387251
694459.3705363221604-15.3705363221604
704559.994862852241-14.994862852241
714553.8081247876397-8.80812478763971
724954.7268609575506-5.72686095755061
736548.178801586279516.8211984137205
744550.1788692358464-5.17886923584638
757154.320185284520816.6798147154792
764849.3032560816701-1.30325608167011
774142.1853056644682-1.18530566446815
784053.7050932937603-13.7050932937603
796452.50756670096711.492433299033
805654.43188079959621.56811920040381
815256.801893851142-4.80189385114196
824146.0016179378135-5.0016179378135
834252.6101509812274-10.6101509812274
845461.3719929802723-7.37199298027229
854047.6858441527095-7.68584415270948
864049.2862248304236-9.2862248304236
875156.2286862622773-5.22868626227735
884860.3782975014772-12.3782975014772
898054.763350976221825.2366490237782
903856.3554706277557-18.3554706277557
915756.41785448450840.582145515491567
922841.4137278579547-13.4137278579547
935153.1227861404026-2.12278614040263
944653.7161123103079-7.71611231030791
955857.32614144338050.673858556619482
966751.319693214217315.6803067857827
977244.998153970682227.0018460293178
982649.1717129113081-23.1717129113081
995453.18167876883820.818321231161827
1005357.9551873231052-4.95518732310525
1016449.772216538022614.2277834619774
1024752.7929689401532-5.79296894015319
1034357.0417970305472-14.0417970305472
1046649.660043808734616.3399561912654
1055452.30625011810341.6937498818966
1066258.11210297698973.88789702301025
1075250.06025227716181.93974772283823
1086452.619935485692211.3800645143078
1095552.1361490872212.86385091277905
1105752.84837062378154.15162937621852
1117455.136899166520118.8631008334799
1123247.616619486964-15.616619486964
1133854.5538279595515-16.5538279595515
1146654.790696084907311.2093039150927
1153756.1293465565965-19.1293465565965
1162647.2855996360277-21.2855996360277
1176452.949885950089511.0501140499105
1182845.4038094436904-17.4038094436904
1196658.66797287825667.3320271217434
1206554.154737859827210.8452621401728
1214848.3190725548548-0.31907255485481
1224455.9584786217907-11.9584786217907
1236458.84188478919975.15811521080032
1243945.5953916958758-6.59539169587577
1255051.4220760158187-1.42207601581875
1266649.909436114835916.0905638851641
1274852.6106421932279-4.6106421932279
1287055.742414922649214.2575850773508
1296655.296129073557810.7038709264422
1306152.44078435897688.55921564102318
1313148.6628685228663-17.6628685228663
1326152.61627286029398.38372713970613
1335440.317011939234313.6829880607657
1343440.77515564456-6.77515564455995
1356260.23948030002631.76051969997375
1364753.9750292190912-6.97502921909117
1375250.74252272011041.25747727988958
1383755.2124921360615-18.2124921360615
1394648.2158750040394-2.21587500403941
1403851.7674637360396-13.7674637360396
1416352.44854243617810.551457563822
1423454.21631513015-20.21631513015
1434647.6041337594669-1.60413375946688
1444047.3195699213459-7.31956992134593
1453047.6858441527095-17.6858441527095
1463548.8001238315276-13.8001238315276
1475148.31907255485482.68092744514519
1485655.09407227546020.905927724539765
1496850.808055606667717.1919443933323
1503948.8113551555407-9.81135515554065
1514456.3746342520892-12.3746342520892
1525848.81135515554079.18864484445935


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.9930111899278220.01397762014435690.00698881007217847
180.984092500528930.03181499894213980.0159074994710699
190.9676119310800540.06477613783989140.0323880689199457
200.9465042453552660.1069915092894690.0534957546447343
210.9248632057186690.1502735885626630.0751367942813315
220.9474766546044370.1050466907911260.052523345395563
230.9867852502495280.0264294995009440.013214749750472
240.9889675687368010.02206486252639850.0110324312631992
250.9820040594889080.03599188102218420.0179959405110921
260.9780168526967710.04396629460645710.0219831473032286
270.9667085224976360.06658295500472880.0332914775023644
280.9512273846839580.09754523063208460.0487726153160423
290.9301488320909080.1397023358181830.0698511679090917
300.9034151220085110.1931697559829780.0965848779914889
310.8755026072268640.2489947855462710.124497392773136
320.8740626941548080.2518746116903850.125937305845192
330.8646895514720980.2706208970558040.135310448527902
340.8996695059287250.2006609881425490.100330494071275
350.8675455797317520.2649088405364970.132454420268248
360.8582051220748060.2835897558503880.141794877925194
370.8194157364898750.361168527020250.180584263510125
380.8295876244769290.3408247510461420.170412375523071
390.8578276928298580.2843446143402830.142172307170142
400.8373345839358580.3253308321282840.162665416064142
410.798530242614080.4029395147718390.20146975738592
420.7603362484668460.4793275030663070.239663751533154
430.8588421599208580.2823156801582840.141157840079142
440.8234367839538870.3531264320922270.176563216046114
450.7874866946155110.4250266107689770.212513305384488
460.8011539962951770.3976920074096470.198846003704823
470.7646318257230230.4707363485539550.235368174276977
480.7926979927712120.4146040144575750.207302007228788
490.7520619185760680.4958761628478640.247938081423932
500.772485271126540.4550294577469210.22751472887346
510.7588442116890470.4823115766219060.241155788310953
520.7615608914875530.4768782170248930.238439108512447
530.7480024488289330.5039951023421350.251997551171068
540.7423374414015210.5153251171969580.257662558598479
550.769087323124330.4618253537513390.230912676875669
560.9002877243498810.1994245513002380.0997122756501191
570.940416826059170.1191663478816610.0595831739408303
580.9271339819948220.1457320360103560.0728660180051778
590.9174077969073630.1651844061852730.0825922030926367
600.8962014647663880.2075970704672240.103798535233612
610.886902926561970.2261941468760610.11309707343803
620.86371042963780.27257914072440.1362895703622
630.8501495714192510.2997008571614980.149850428580749
640.8830755439297680.2338489121404650.116924456070232
650.857032866968320.2859342660633610.14296713303168
660.8527283482580790.2945433034838420.147271651741921
670.8661588148684960.2676823702630090.133841185131504
680.8364994182349220.3270011635301570.163500581765078
690.860906125626030.2781877487479390.13909387437397
700.871028476637820.2579430467243610.128971523362181
710.8572979718429010.2854040563141980.142702028157099
720.8340136871642940.3319726256714120.165986312835706
730.8451429405800920.3097141188398160.154857059419908
740.8181214595548630.3637570808902750.181878540445137
750.8879868376849210.2240263246301580.112013162315079
760.8618305666464940.2763388667070120.138169433353506
770.8318775207600980.3362449584798040.168122479239902
780.8233791605223740.3532416789552520.176620839477626
790.8230338930539450.3539322138921090.176966106946054
800.798341893512220.4033162129755610.20165810648778
810.7665435568193530.4669128863612950.233456443180647
820.7321808999383910.5356382001232180.267819100061609
830.7174159284232080.5651681431535830.282584071576792
840.6957500311946120.6084999376107770.304249968805388
850.6711731777767330.6576536444465340.328826822223267
860.6500602625496090.6998794749007820.349939737450391
870.6193860482643470.7612279034713060.380613951735653
880.6353103780662920.7293792438674160.364689621933708
890.7442962934123580.5114074131752830.255703706587641
900.7905778917076850.4188442165846310.209422108292315
910.7522546874854220.4954906250291550.247745312514578
920.7445471845972710.5109056308054570.255452815402729
930.7047995196053920.5904009607892170.295200480394608
940.682741480757860.634517038484280.31725851924214
950.6403398158736090.7193203682527820.359660184126391
960.6369822042410280.7260355915179450.363017795758972
970.7936920014546470.4126159970907060.206307998545353
980.8667569025395210.2664861949209570.133243097460479
990.8342998517619560.3314002964760890.165700148238044
1000.8149951851227720.3700096297544560.185004814877228
1010.8353575361909260.3292849276181490.164642463809074
1020.8098770895237470.3802458209525070.190122910476253
1030.8487399966090140.3025200067819720.151260003390986
1040.8618876057692850.2762247884614290.138112394230715
1050.82685196192510.3462960761498010.1731480380749
1060.7948670063548460.4102659872903080.205132993645154
1070.750246718070760.4995065638584810.249753281929241
1080.7222893798792210.5554212402415580.277710620120779
1090.6761550562115380.6476898875769230.323844943788462
1100.6257932726748620.7484134546502750.374206727325138
1110.6670744361125030.6658511277749950.332925563887498
1120.6897631400948740.6204737198102530.310236859905126
1130.7086219077152620.5827561845694750.291378092284737
1140.6679385398959750.664122920208050.332061460104025
1150.6468868840556380.7062262318887240.353113115944362
1160.747252666927610.5054946661447790.252747333072389
1170.7221393311729050.555721337654190.277860668827095
1180.7641639977075930.4716720045848140.235836002292407
1190.7308267077374090.5383465845251820.269173292262591
1200.6931716879069810.6136566241860370.306828312093019
1210.6241981893179810.7516036213640380.375801810682019
1220.6141924611534080.7716150776931840.385807538846592
1230.5944302512449490.81113949751010.40556974875505
1240.5374787204064880.9250425591870230.462521279593512
1250.4558318092985880.9116636185971770.544168190701412
1260.4558805976567180.9117611953134360.544119402343282
1270.6314883409929760.7370233180140480.368511659007024
1280.5458982538255650.908203492348870.454101746174435
1290.4509366866954370.9018733733908730.549063313304563
1300.4513795837978490.9027591675956980.548620416202151
1310.5370936013762730.9258127972474540.462906398623727
1320.4196055889116610.8392111778233220.580394411088339
1330.3871099283555420.7742198567110830.612890071644458
1340.2685994261614810.5371988523229620.731400573838519
1350.1571519352723550.314303870544710.842848064727645


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


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


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


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290513279f66e4263rxosqgx/9vpiq1290513336.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290513279f66e4263rxosqgx/9vpiq1290513336.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