Home » date » 2010 » Dec » 10 »

*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, 10 Dec 2010 15:14:43 +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/10/t12919940012io920fgctv588a.htm/, Retrieved Fri, 10 Dec 2010 16:13:32 +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/10/t12919940012io920fgctv588a.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 «
23 13 14 22 11 23 8 1 6 15 20 12 7 20 22 24 4 2 5 23 26 26 22 25 23 24 7 2 20 26 19 16 12 23 21 21 4 2 12 19 17 18 15 20 19 21 4 2 11 19 17 12 9 22 12 19 5 2 12 16 21 18 20 18 24 12 15 1 11 23 18 20 10 22 21 21 5 1 9 22 16 18 12 23 21 25 7 2 13 19 26 24 23 28 26 27 4 2 9 24 20 17 10 19 18 21 4 1 14 19 14 19 11 26 21 27 7 1 12 25 22 12 20 27 22 20 8 1 18 23 23 25 11 23 26 16 4 2 9 31 25 23 22 27 20 26 8 1 15 29 24 22 19 23 20 24 4 2 12 18 24 23 20 23 26 25 5 2 12 17 16 16 16 19 27 25 16 1 12 22 16 16 12 21 27 27 7 1 15 21 20 15 14 25 16 23 4 2 11 24 20 24 14 22 26 22 6 1 13 22 15 18 9 13 20 10 4 1 10 16 22 23 19 12 25 25 5 2 17 22 20 18 17 20 16 18 4 1 13 21 20 19 14 24 20 21 4 1 17 25 24 17 19 23 20 20 6 1 15 22 27 22 20 25 24 18 4 1 13 24 25 22 20 28 24 25 4 1 17 25 13 8 9 24 22 28 4 1 21 29 15 12 10 18 18 27 8 1 12 19 19 22 6 19 21 20 5 2 12 29 20 16 15 24 17 20 4 1 15 25 11 12 9 22 15 20 10 2 8 19 28 28 24 28 28 27 4 2 15 27 21 15 11 24 23 23 4 1 16 25 25 17 4 28 19 23 4 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 time16 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
E/Introjected[t] = + 7.23124359254075 -0.156662461706075`I/ToKnow`[t] + 0.684714728855979`I/Accomp.`[t] -0.0407110067422431`I/Exp.Stimulation`[t] + 0.0328194315356129`E/Identified`[t] + 0.189562104249828`E/Ext.Regulation`[t] + 0.250551965087687Amotivation[t] -0.644346153149622gender[t] + 0.150792391144349PE[t] -0.141157422196598PS[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.231243592540753.2377392.23340.0271310.013565
`I/ToKnow`-0.1566624617060750.112935-1.38720.167620.08381
`I/Accomp.`0.6847147288559790.0827098.278600
`I/Exp.Stimulation`-0.04071100674224310.076596-0.53150.5959230.297962
`E/Identified`0.03281943153561290.1098410.29880.7655490.382774
`E/Ext.Regulation`0.1895621042498280.0883472.14560.0336510.016826
Amotivation0.2505519650876870.1158412.16290.0322720.016136
gender-0.6443461531496220.634932-1.01480.3119640.155982
PE0.1507923911443490.0906261.66390.0984010.049201
PS-0.1411574221965980.073709-1.91510.0575550.028777


Multiple Linear Regression - Regression Statistics
Multiple R0.624933873306455
R-squared0.390542346005808
Adjusted R-squared0.350795107701839
F-TEST (value)9.82564733225276
F-TEST (DF numerator)9
F-TEST (DF denominator)138
p-value1.53219659182469e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.46774715378046
Sum Squared Residuals1659.48730451224


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11117.1887628270360-6.18876282703598
22214.45632998945497.54367001054511
32325.2458629755851-2.24586297558509
42118.29824474152792.70175525847212
51919.6096154166741-0.609615416674066
61216.2569243613851-4.25692436138505
72419.84350081514674.15649918485333
82121.2614173788212-0.261417378821210
92121.7983582877648-0.798358287764784
102622.37480976502953.62519023497049
111819.7223722314581-1.72237223145814
122122.9613006787073-1.96130067870733
132216.69210468052055.30789531947951
142620.78066170010835.21933829989173
152023.5106082182199-3.51060821821988
162022.0480874938838-2.04808749388376
172623.27336270753162.72663729246839
182722.45985625814614.54014374185394
192721.40603026652645.59396973347362
201616.9636291069249-0.96362910692488
212624.56739097777891.43260902222108
222018.76931324163731.23068675836266
232523.3145597355331.68544026446699
241619.153135796367-3.15313579636700
252020.6984874601326-0.698487460132645
262018.89946300057621.1005369994238
272420.41384935070993.58615064929007
282422.61457944085851.38542055914148
292215.83229231391046.16770768608959
301818.8872871677340-0.887287167734022
312121.1689370678466-0.168937067846635
321718.1124853802839-1.11248538028394
331517.6125792301426-2.61257923014258
342825.24091483057532.75908516942467
352318.15343092058474.84656907941531
361917.89488725804361.10511274195636
371517.6477378428373-2.6477378428373
382623.49615077465662.50384922534336
392024.9812770994927-4.98127709949271
401114.9543741856871-3.95437418568707
411719.5076319547439-2.50763195474392
421618.0159081532637-2.01590815326374
432122.5267747024960-1.52677470249604
441817.26041329371670.739586706283348
451717.6482452784581-0.648245278458144
462121.5993958166478-0.599395816647835
471821.3327762174706-3.33277621747061
481614.4087157688421.591284231158
491315.7811597303024-2.78115973030241
502826.92520653374751.07479346625247
512518.02240665766856.97759334233148
522421.31482886777402.68517113222596
531518.1465145756053-3.14651457560527
542122.1150334611454-1.11503346114539
551117.3055435446565-6.30554354465651
562722.48731606080034.51268393919967
572320.7798404572412.22015954275900
582123.0554336647138-2.05543366471380
591616.7927628387478-0.79276283874781
602019.40388678278540.596113217214579
612122.8359293892082-1.83592938920819
621016.5624004427194-6.56240044271935
631824.950439502491-6.95043950249101
642019.79949797190890.200502028091068
652126.7991340167883-5.79913401678832
662421.25369204979362.74630795020637
672623.42341566940602.57658433059402
682321.37552212304891.62447787695114
692221.43021561750960.569784382490431
701315.6755620232162-2.67556202321618
712725.34160578087121.6583942191288
722420.98644304795593.01355695204411
731922.8976974155697-3.89769741556970
741719.0422683298177-2.04226832981766
751620.2335138850657-4.23351388506566
762019.25507678437410.744923215625898
77814.119714762494-6.119714762494
781620.0472167220481-4.04721672204815
791719.1298674151291-2.12986741512906
802323.5329828397716-0.532982839771556
811818.6175506623624-0.617550662362426
822423.51233719377050.487662806229457
831716.80184944415690.198150555843109
842021.1964205354342-1.19642053543419
852220.28699210848841.71300789151159
862219.71534199944612.28465800055394
872020.3920587044841-0.392058704484145
881822.659226099686-4.65922609968601
892118.76461906184742.23538093815263
902319.11028052062583.88971947937421
912822.40800974303975.59199025696031
921921.1431661016515-2.14316610165151
932218.73069144075203.26930855924803
941720.630582557575-3.630582557575
952523.76002100533011.23997899466989
962222.0333878398901-0.0333878398900595
972120.45170741163390.54829258836611
981520.2664311077195-5.26643110771953
992019.95154465225060.0484553477493742
1002519.02502515373195.97497484626807
1012119.58850064458981.41149935541024
1022425.1898300578726-1.18983005787262
1032322.13553191336340.864468086636633
1042223.9847330929990-1.98473309299895
1051419.0529206292084-5.05292062920841
1061120.9949953105267-9.99499531052673
1072220.11248196893731.88751803106270
1082222.1018216029887-0.101821602988680
109613.7634887169726-7.76348871697257
1101521.2973529597553-6.29735295975528
1112621.70364200054574.29635799945426
1122621.85301421438184.14698578561819
1132015.97813616830294.0218638316971
1142624.02113428124751.97886571875252
1151516.7611299546477-1.76112995464770
1162521.06074841989973.93925158010031
1172222.9548358783562-0.954835878356176
1182021.3716323893948-1.37163238939482
1191820.6186987124349-2.61869871243485
1202316.52151495428466.47848504571544
1212220.0360489862281.96395101377202
1222320.13961422353342.86038577646658
1231720.8876850950878-3.8876850950878
1242017.63021276299292.36978723700714
1252121.4433052748186-0.443305274818585
1262324.2748336348976-1.27483363489764
1272523.53235186729761.46764813270237
1282522.29758939783942.70241060216059
1292118.57870528293252.42129471706754
1302220.22302015870731.77697984129266
1311818.0548836246437-0.054883624643704
1321824.0087645771665-6.00876457716654
1331821.5994312412264-3.59943124122642
1342119.49439131048391.50560868951609
1352117.92138150953013.07861849046989
1362520.46071484316814.53928515683194
1372419.93465515768814.06534484231186
1382423.36518480631230.634815193687677
1392825.33619420937872.66380579062131
1402422.90094074641591.0990592535841
1412222.2477233066586-0.247723306658584
1422221.79925825361190.200741746388102
1432021.8750954544727-1.87509545447273
1442521.98428495043393.01571504956611
1451317.8906191366642-4.89061913666421
1462119.74570241579721.25429758420276
1472319.09521482285563.90478517714438
1481821.0318426087169-3.03184260871692


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.6779957061297390.6440085877405220.322004293870261
140.6027117367006020.7945765265987960.397288263299398
150.7506466668266060.4987066663467880.249353333173394
160.6522817665505030.6954364668989930.347718233449497
170.7998077519143720.4003844961712570.200192248085628
180.8038551472013320.3922897055973360.196144852798668
190.8588493236494090.2823013527011820.141150676350591
200.8843452914518660.2313094170962680.115654708548134
210.865863216692070.2682735666158610.134136783307930
220.8186810291677760.3626379416644470.181318970832224
230.8160433277109090.3679133445781820.183956672289091
240.8152696015354040.3694607969291920.184730398464596
250.759708321244390.480583357511220.24029167875561
260.7068316338799380.5863367322401240.293168366120062
270.7181213041558730.5637573916882540.281878695844127
280.6754584203319320.6490831593361360.324541579668068
290.6601602380695380.6796795238609250.339839761930462
300.6148201361096360.7703597277807280.385179863890364
310.5997754090272120.8004491819455760.400224590972788
320.5753133741028290.8493732517943420.424686625897171
330.5668947346575090.8662105306849820.433105265342491
340.5240051823658920.9519896352682160.475994817634108
350.5339649959885250.932070008022950.466035004011475
360.4753577234023630.9507154468047270.524642276597637
370.5231975195524490.9536049608951020.476802480447551
380.474390582362370.948781164724740.52560941763763
390.5130951276767260.9738097446465470.486904872323274
400.5926927131303640.8146145737392710.407307286869636
410.6373344478411470.7253311043177050.362665552158853
420.6006565144036220.7986869711927550.399343485596378
430.5534542543193010.8930914913613990.446545745680699
440.5002878304013480.9994243391973050.499712169598652
450.4473543037830010.8947086075660030.552645696216999
460.3929214018158760.7858428036317510.607078598184124
470.370932515501160.741865031002320.62906748449884
480.3557202785534540.7114405571069080.644279721446546
490.3577002173260450.7154004346520910.642299782673954
500.318161888035830.636323776071660.68183811196417
510.4571326143873870.9142652287747730.542867385612613
520.432649885278830.865299770557660.56735011472117
530.4235411604621010.8470823209242010.576458839537899
540.3780114106615180.7560228213230360.621988589338482
550.4888370546637020.9776741093274040.511162945336298
560.4930026744529220.9860053489058430.506997325547078
570.4731297897536190.9462595795072380.526870210246381
580.4539367536548260.9078735073096520.546063246345174
590.407082528228960.814165056457920.59291747177104
600.3580396765581850.716079353116370.641960323441815
610.345521674328540.691043348657080.65447832567146
620.4517706412139380.9035412824278760.548229358786062
630.5532995908598820.8934008182802360.446700409140118
640.5044323487759890.9911353024480220.495567651224011
650.6118478489589090.7763043020821820.388152151041091
660.5967205182760610.8065589634478780.403279481723939
670.6032910748506990.7934178502986020.396708925149301
680.5642989771614210.8714020456771570.435701022838579
690.5172996174965670.9654007650068660.482700382503433
700.5053697322834090.9892605354331830.494630267716591
710.4649091856056570.9298183712113140.535090814394343
720.4639821178534190.9279642357068370.536017882146582
730.4769409508115640.9538819016231270.523059049188436
740.4394670101149850.878934020229970.560532989885015
750.4741392842469750.9482785684939510.525860715753025
760.4262138401301590.8524276802603180.573786159869841
770.5512501744752760.8974996510494480.448749825524724
780.5616777737934500.8766444524131010.438322226206550
790.5305078327398660.9389843345202690.469492167260134
800.4895944689877610.9791889379755220.510405531012239
810.4406426846013650.881285369202730.559357315398635
820.3919671536984130.7839343073968250.608032846301587
830.3443492722970880.6886985445941760.655650727702912
840.3016670947914230.6033341895828450.698332905208577
850.2664866533436340.5329733066872680.733513346656366
860.2390013714892290.4780027429784580.760998628510771
870.2018251812790950.4036503625581910.798174818720905
880.2270481914198490.4540963828396990.772951808580151
890.2039675545359230.4079351090718450.796032445464077
900.2102714044768310.4205428089536620.789728595523169
910.2771280564379410.5542561128758820.722871943562059
920.2520189018742820.5040378037485650.747981098125718
930.2563191852871640.5126383705743280.743680814712836
940.2745400001389810.5490800002779630.725459999861019
950.2361581976749780.4723163953499550.763841802325023
960.2000398117303850.4000796234607690.799960188269615
970.1660632318264630.3321264636529260.833936768173537
980.2058547986774170.4117095973548340.794145201322583
990.1699286229897910.3398572459795810.83007137701021
1000.2611650292928540.5223300585857080.738834970707146
1010.2250110529778490.4500221059556970.774988947022151
1020.1958806949199250.3917613898398490.804119305080075
1030.1612031064143770.3224062128287540.838796893585623
1040.1475154722242500.2950309444485010.85248452777575
1050.1625691549566940.3251383099133870.837430845043306
1060.5287631591788270.9424736816423450.471236840821173
1070.4795373666123900.9590747332247810.520462633387609
1080.4515007759524090.9030015519048180.548499224047591
1090.7362075387356950.5275849225286110.263792461264305
1100.8744859473727080.2510281052545850.125514052627292
1110.871550831621230.2568983367575410.128449168378770
1120.909225156010680.1815496879786400.0907748439893198
1130.898055762832950.2038884743340980.101944237167049
1140.8860638532008950.2278722935982090.113936146799105
1150.909531405750440.1809371884991200.0904685942495602
1160.8884549402122550.223090119575490.111545059787745
1170.8521380833364230.2957238333271540.147861916663577
1180.839142997446670.3217140051066590.160857002553329
1190.839925680490470.3201486390190590.160074319509530
1200.9048572498811380.1902855002377240.0951427501188618
1210.8738318752443550.2523362495112890.126168124755645
1220.8711131373422590.2577737253154830.128886862657741
1230.8622279026496040.2755441947007920.137772097350396
1240.8170900980816690.3658198038366620.182909901918331
1250.753625434567360.4927491308652810.246374565432640
1260.7156114784727830.5687770430544350.284388521527217
1270.6379625399942390.7240749200115230.362037460005761
1280.5586127514895680.8827744970208640.441387248510432
1290.4707527953231390.9415055906462770.529247204676861
1300.429229122483750.85845824496750.57077087751625
1310.3271372702418850.6542745404837710.672862729758115
1320.2513340084560160.5026680169120320.748665991543984
1330.4821986327325930.9643972654651860.517801367267407
1340.6207910542970090.7584178914059810.379208945702991
1350.5965989562472130.8068020875055730.403401043752787


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


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/19zz21291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/19zz21291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/29zz21291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/29zz21291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/3k9gn1291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/3k9gn1291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/4k9gn1291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/4k9gn1291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/5k9gn1291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/5k9gn1291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/6dif81291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/6dif81291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/7n9xb1291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/7n9xb1291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/8n9xb1291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/8n9xb1291994066.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/9n9xb1291994066.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/10/t12919940012io920fgctv588a/9n9xb1291994066.ps (open in new window)


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