Home » date » 2010 » Dec » 19 »

Multiple Regression - Gender - Model 3

*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: Sun, 19 Dec 2010 14:39:35 +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/19/t1292769489ql79mw8mkfsq3im.htm/, Retrieved Sun, 19 Dec 2010 15:38:20 +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/19/t1292769489ql79mw8mkfsq3im.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:
elly.decuyper@student.lessius.eu
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1 1 4 4 5 5 3 3 1 1 2 2 7 7 4 4 1 2 2 2 7 7 3 3 1 1 4 4 7 7 4 4 1 1 3 3 3 3 1 1 1 1 1 1 2 2 4 4 1 1 2 2 1 1 2 2 1 1 3 3 7 7 6 6 1 1 5 5 5 5 2 2 1 1 2 2 5 5 4 4 1 2 4 4 6 6 2 2 1 1 3 3 2 2 2 2 1 1 2 2 6 6 2 2 1 2 4 4 6 6 6 6 1 1 2 2 6 6 2 2 1 1 5 5 6 6 4 4 1 1 5 5 6 6 3 3 1 1 1 1 1 1 1 1 1 1 2 2 7 7 4 4 1 1 1 1 4 4 1 1 1 1 3 3 3 3 4 4 1 2 2 2 7 7 1 1 1 1 4 4 5 5 4 4 1 1 6 6 2 2 3 3 1 2 3 3 7 7 2 2 1 1 2 2 2 2 4 4 1 1 6 6 7 7 5 5 1 1 2 2 3 3 5 5 1 2 2 2 3 3 2 2 1 1 1 1 2 2 3 3 1 1 3 3 5 5 2 2 1 1 4 4 2 2 2 2 1 1 3 3 5 5 2 2 1 1 2 2 2 2 2 2 1 1 2 2 5 5 2 2 1 1 3 3 2 2 2 2 1 1 7 7 2 2 1 1 1 1 2 2 5 5 3 3 1 1 4 4 3 3 2 2 1 1 2 2 5 5 2 2 1 2 4 4 5 5 4 4 1 1 5 5 5 5 3 3 1 2 6 6 6 6 3 3 1 2 5 5 5 5 4 4 1 2 1 1 5 5 2 2 1 1 4 4 3 3 5 5 1 1 1 1 3 3 1 1 1 1 3 3 2 2 3 3 1 2 5 5 4 4 3 3 1 2 6 6 5 5 2 2 1 1 2 2 5 5 4 4 1 1 2 2 5 5 4 4 1 4 2 2 6 6 4 4 1 1 5 5 5 5 4 4 1 1 6 6 5 5 4 4 1 1 5 5 7 7 2 2 1 1 2 2 3 3 3 3 1 1 6 6 6 6 3 3 1 1 2 2 4 4 3 3 1 1 5 5 5 5 2 2 0 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Depressed[t] = + 0.662537841777522 + 0.25238470945307Gender[t] + 0.0853508546307408Cannotdo[t] -0.100066691536636Cannotdo_G[t] + 0.0272494690723533Worrytoomuch[t] + 0.0661112827823411Worrytoomuch_G[t] + 0.0878761060617949Limitactivity[t] -0.100397334494416Limitactivity_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)0.6625378417775220.1781053.71990.0002850.000142
Gender0.252384709453070.3088520.81720.4151810.207591
Cannotdo0.08535085463074080.0387832.20070.0293490.014675
Cannotdo_G-0.1000666915366360.059751-1.67470.0961550.048078
Worrytoomuch0.02724946907235330.0355040.76750.4440350.222017
Worrytoomuch_G0.06611128278234110.0554241.19280.2348960.117448
Limitactivity0.08787610606179490.0449241.95610.0523880.026194
Limitactivity_G-0.1003973344944160.07554-1.32910.1859310.092966


Multiple Linear Regression - Regression Statistics
Multiple R0.365770122455319
R-squared0.133787782480979
Adjusted R-squared0.0916802441293597
F-TEST (value)3.17728814645453
F-TEST (DF numerator)7
F-TEST (DF denominator)144
p-value0.00371872395290329
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.550583886731518
Sum Squared Residuals43.6525367512875


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
111.28529927758259-0.285299277582593
211.48893122667116-0.488931226671161
321.501452455103800.498547544896202
411.45949955285938-0.459499552859382
511.13833606764436-0.138336067644365
611.03684330430360-0.0368433043035968
710.953809172408250.0461908275917495
811.44917293290004-0.449172932900035
911.28310466910934-0.28310466910934
1011.30220972296178-0.302209722961785
1121.391181257869930.60881874213007
1211.03245408735705-0.0324540873570483
1311.42061293168172-0.420612931681722
1421.341096344139440.658903655860555
1511.42061293168172-0.420612931681722
1611.35142296409879-0.351422964098792
1711.36394419253141-0.363944192531413
1810.9810462377467670.0189537622532331
1911.48893122667117-0.488931226671174
2011.26112849331085-0.26112849331085
2111.1007723823465-0.1007723823465
2221.526494911969040.473505088030963
2311.27277804914999-0.272778049149993
2410.975785348206740.0242146517932606
2521.499257846630520.500742153369479
2611.02212746739770-0.0221274673977014
2711.41754665061497-0.417546650614969
2811.10296699081977-0.102966990819774
2921.140530676117640.859469323882361
3011.04936453273622-0.0493645327362187
3111.31253634292113-0.312536342921132
3211.01773825045115-0.0177382504511524
3311.31253634292113-0.312536342921132
3411.04716992426294-0.0471699242629441
3511.32725217982703-0.327252179827027
3611.03245408735705-0.0324540873570483
3710.9861119681660860.0138880318339138
3811.31473095139441-0.314730951394406
3911.11109900230585-0.111099002305847
4011.32725217982703-0.327252179827027
4121.272778049149990.727221950850007
4211.27058344067672-0.270583440676719
4321.349228355625520.650771644374483
4421.258062212244100.741937787755903
4521.341968016732920.658031983267077
4611.07353531700798-0.0735353170079827
4711.16776774145616-0.167767741456156
4811.01993285892443-0.0199328589244269
4921.177222688822020.822777311177976
5021.268388832203440.731611167796556
5111.30220972296178-0.302209722961785
5211.30220972296178-0.302209722961785
5341.395570474816482.60442952518352
5411.25806221224410-0.258062212244097
5511.2433463753382-0.243346375338201
5611.46982617281873-0.469826172818729
5711.12800944768502-0.128009447685017
5811.34922835562552-0.349228355625517
5911.22137019953971-0.221370199539712
6011.28310466910934-0.28310466910934
6111.28869134871349-0.288691348713487
6211.0634907013073-0.0634907013072994
6311.57704388454017-0.577043884540171
6420.9508903776042051.04910962239579
6511.03011353339021-0.0301135333902110
6641.604293353612522.39570664638748
6711.14776435995541-0.147764359955413
6811.11546438802095-0.115464388020952
6921.577043884540170.422956115459829
7011.23924291343089-0.239242913430889
7111.32099132064795-0.320991320647949
7210.9720121478318240.0279878521681764
7311.68964420824326-0.689644208243265
7421.345715538289250.654284461710752
7521.752796096663760.247203903336240
7611.63767052152961-0.637670521529612
7721.379092706206340.620907293793664
7811.36791450449949-0.367914504499493
7921.518942498981780.481057501018217
8010.863014271542410.136985728457589
8111.37151695191317-0.371516951913174
8211.0634907013073-0.0634907013072994
8310.863014271542410.136985728457589
8411.038766483666-0.0387664836660002
8511.32206851663058-0.322068516630575
8611.52254494639546-0.522544946395464
8711.31846606921689-0.318466069216895
8811.17609102501039-0.176091025010393
8911.32711901949268-0.327119019492684
9021.455790610561290.544209389438712
9111.29481904755822-0.294819047558222
9211.0634907013073-0.0634907013072994
9321.318466069216890.681533930783105
9411.11798963945201-0.117989639452006
9511.57704388454017-0.577043884540171
9611.42854114148893-0.428541141488934
9711.34679273427187-0.346792734271875
9821.464443560837080.535556439162923
9911.66491999060197-0.664919990601965
10011.68964420824326-0.689644208243265
10111.51389199611967-0.513891996119675
10231.610421052457261.38957894754274
10321.117989639452010.882010360547994
10421.431066392919990.568933607080011
10511.12159208686569-0.121592086865687
10611.2058657455138-0.205865745513801
10711.23311521458615-0.233115214586154
10811.43466884033367-0.434668840333669
10910.8902637406147640.109736259385236
11031.631542822684881.36845717731512
11110.9483651261731510.0516348738268488
11210.9720121478318240.0279878521681764
11311.05736300246256-0.0573630024625643
11411.15136680736909-0.151366807369094
11511.00178686833523-0.00178686833523106
11611.40741937126132-0.407419371261316
11711.49421828134048-0.494218281340484
11811.17861627644145-0.178616276441447
11911.23311521458615-0.233115214586154
12011.26288993508956-0.262889935089561
12111.31594081778584-0.315940817785840
12211.15136680736909-0.151366807369094
12331.726623823574031.27337617642597
12421.401291672416580.598708327583419
12521.257839432227450.742160567772547
12611.51894249898178-0.518942498981784
12710.9149879582560630.085012041743937
12811.8381469512945-0.838146951294501
12911.22806471172405-0.228064711724046
13011.0634907013073-0.0634907013072994
13121.429618337471560.570381662528439
13211.43719409176472-0.437194091764724
13311.34319028685819-0.343190286858194
13411.49169302990943-0.49169302990943
13510.9756145952455050.0243854047544955
13611.54979441546782-0.549794415467818
13710.9756145952455050.0243854047544955
13811.2305899631551-0.2305899631551
13911.57956913597123-0.579569135971225
14011.03624123223495-0.0362412322349461
14111.32099132064795-0.320991320647949
14221.320991320647950.679008679352051
14311.25783943222745-0.257839432227453
14411.31594081778584-0.315940817785840
14510.863014271542410.136985728457589
14611.14523910852436-0.145239108524359
14711.05736300246256-0.0573630024625643
14811.0634907013073-0.0634907013072994
14921.296267103006650.70373289699335
15011.49421828134048-0.494218281340484
15131.662394739170911.33760526082909
15210.9720121478318240.0279878521681764


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.5600847763637110.8798304472725780.439915223636289
120.3909166779268490.7818333558536970.609083322073151
130.4239905106478990.8479810212957970.576009489352101
140.6093900075311170.7812199849377660.390609992468883
150.512084831275250.97583033744950.48791516872475
160.4403726751305840.8807453502611670.559627324869416
170.3606770736771770.7213541473543540.639322926322823
180.2714047232681440.5428094465362880.728595276731856
190.2209281816671980.4418563633343960.779071818332802
200.1592387149759460.3184774299518930.840761285024054
210.1106268983657650.2212537967315290.889373101634235
220.1423536646874670.2847073293749350.857646335312533
230.1033320340640490.2066640681280990.896667965935951
240.07138125015771860.1427625003154370.928618749842281
250.08016882107755930.1603376421551190.91983117892244
260.05594257225661110.1118851445132220.944057427743389
270.04323713085632780.08647426171265560.956762869143672
280.02921928151538990.05843856303077990.97078071848461
290.06653419076832260.1330683815366450.933465809231677
300.04639637606592970.09279275213185940.95360362393407
310.03626370007950640.07252740015901270.963736299920494
320.02444171882683330.04888343765366670.975558281173167
330.01856935477734870.03713870955469740.981430645222651
340.01217512517465240.02435025034930480.987824874825348
350.009290641367868890.01858128273573780.99070935863213
360.005890585264713410.01178117052942680.994109414735287
370.003852421594085690.007704843188171390.996147578405914
380.002824487733494480.005648975466988970.997175512266506
390.001734386742416080.003468773484832150.998265613257584
400.001290463369306610.002580926738613220.998709536630693
410.003500057991160920.007000115982321850.996499942008839
420.002408136568646040.004816273137292070.997591863431354
430.003954517219142050.007909034438284110.996045482780858
440.007020662937545530.01404132587509110.992979337062454
450.01014846292761110.02029692585522210.989851537072389
460.006875095009964510.01375019001992900.993124904990035
470.004720254455395560.009440508910791130.995279745544604
480.003102300126935260.006204600253870510.996897699873065
490.006704697919050240.01340939583810050.99329530208095
500.0119495171725570.0238990343451140.988050482827443
510.01169827365520990.02339654731041980.98830172634479
520.01604227106171960.03208454212343930.98395772893828
530.6339470404899850.732105919020030.366052959510015
540.5953216402041610.8093567195916780.404678359795839
550.5548406758706750.890318648258650.445159324129325
560.5333639667662580.9332720664674840.466636033233742
570.4842864742801040.9685729485602080.515713525719896
580.4481543090624650.896308618124930.551845690937535
590.4035166206697320.8070332413394640.596483379330268
600.3634621546631920.7269243093263850.636537845336808
610.3216735474798640.6433470949597280.678326452520136
620.2782795229950650.556559045990130.721720477004935
630.2535274360321920.5070548720643840.746472563967808
640.2934880020041580.5869760040083150.706511997995843
650.2521897101460420.5043794202920850.747810289853958
660.826750243360410.3464995132791790.173249756639589
670.9034602792623050.1930794414753900.0965397207376949
680.8814441120234580.2371117759530850.118555887976542
690.8684848768261940.2630302463476120.131515123173806
700.8662172243302380.2675655513395240.133782775669762
710.855960706504210.2880785869915790.144039293495790
720.8274535998707580.3450928002584830.172546400129242
730.865090884102320.2698182317953620.134909115897681
740.8698984860849720.2602030278300560.130101513915028
750.8471032753325340.3057934493349330.152896724667466
760.8590087965330360.2819824069339270.140991203466964
770.86215071425470.2756985714906010.137849285745300
780.8467759262842120.3064481474315760.153224073715788
790.8363170479319790.3273659041360430.163682952068021
800.8060914888932040.3878170222135920.193908511106796
810.7836012777172040.4327974445655920.216398722282796
820.7466793289580220.5066413420839570.253320671041978
830.7082426950120030.5835146099759950.291757304987997
840.6670866526294740.6658266947410520.332913347370526
850.6333624152962160.7332751694075680.366637584703784
860.6212637432782320.7574725134435360.378736256721768
870.5945678162868040.8108643674263930.405432183713197
880.5500495731079960.8999008537840070.449950426892004
890.5198550819235140.9602898361529720.480144918076486
900.5135595200262010.9728809599475970.486440479973799
910.4780021777232120.9560043554464250.521997822276788
920.4294874787213450.858974957442690.570512521278655
930.4478009408101040.8956018816202070.552199059189896
940.4032811203367550.806562240673510.596718879663245
950.4035724504063240.8071449008126480.596427549593676
960.3813182948628410.7626365897256830.618681705137158
970.3533048339634370.7066096679268750.646695166036563
980.3483515992280920.6967031984561830.651648400771908
990.3670794397800980.7341588795601960.632920560219902
1000.396015967835340.792031935670680.60398403216466
1010.4031716210559620.8063432421119240.596828378944038
1020.6748271363580480.6503457272839050.325172863641952
1030.746334288914950.50733142217010.25366571108505
1040.7432755345962940.5134489308074120.256724465403706
1050.7003128164111460.5993743671777080.299687183588854
1060.6597763231817060.6804473536365870.340223676818294
1070.6198363542609440.7603272914781110.380163645739056
1080.6087105665966610.7825788668066780.391289433403339
1090.5577181556213690.8845636887572620.442281844378631
1100.8197654161012270.3604691677975470.180234583898773
1110.7813830879692180.4372338240615630.218616912030782
1120.7402213971289010.5195572057421980.259778602871099
1130.6914443020941230.6171113958117550.308555697905877
1140.6417927447436870.7164145105126270.358207255256313
1150.6051154283858380.7897691432283250.394884571614162
1160.608914084809080.782171830381840.39108591519092
1170.5828333636888730.8343332726222530.417166636311127
1180.5270791912109280.9458416175781450.472920808789072
1190.470790804039030.941581608078060.52920919596097
1200.4206036498958760.8412072997917510.579396350104124
1210.3775334149825770.7550668299651550.622466585017422
1220.3241037522050370.6482075044100750.675896247794963
1230.5178837884444480.9642324231111030.482116211555552
1240.5288188407906810.9423623184186390.471181159209319
1250.611878225569890.776243548860220.38812177443011
1260.569680956120060.8606380877598790.430319043879939
1270.4966505956637150.993301191327430.503349404336285
1280.5495205668338640.9009588663322720.450479433166136
1290.4797876154327100.9595752308654190.520212384567290
1300.4028430395229640.8056860790459290.597156960477036
1310.4032775591346940.8065551182693890.596722440865306
1320.3666804680715390.7333609361430770.633319531928461
1330.2964346543618610.5928693087237230.703565345638139
1340.2684717942698010.5369435885396020.731528205730199
1350.197020219805130.394040439610260.80297978019487
1360.2148328529355450.429665705871090.785167147064455
1370.1468644575773610.2937289151547220.853135542422639
1380.09773038408016330.1954607681603270.902269615919837
1390.1486073295088540.2972146590177070.851392670491146
1400.0943766889609240.1887533779218480.905623311039076
1410.06657945892343040.1331589178468610.93342054107657


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level90.0687022900763359NOK
5% type I error level210.160305343511450NOK
10% type I error level250.190839694656489NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/10rfqg1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/10rfqg1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/1kebm1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/1kebm1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/2dnap1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/2dnap1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/3dnap1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/3dnap1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/4dnap1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/4dnap1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/5dnap1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/5dnap1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/65wrs1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/65wrs1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/7y6rd1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/7y6rd1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/8y6rd1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/8y6rd1292769564.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/9rfqg1292769564.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292769489ql79mw8mkfsq3im/9rfqg1292769564.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