Home » date » 2010 » Dec » 12 »

Workshop 10 - multiple regression

*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, 12 Dec 2010 09:01:46 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1.htm/, Retrieved Sun, 12 Dec 2010 10:00:14 +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/12/t12921444042wi1u6z7sqx61x1.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 24 14 11 12 24 26 0 25 11 7 8 25 23 0 17 6 17 8 30 25 1 18 12 10 8 19 23 1 18 8 12 9 22 19 1 16 10 12 7 22 29 1 20 10 11 4 25 25 1 16 11 11 11 23 21 1 18 16 12 7 17 22 1 17 11 13 7 21 25 0 23 13 14 12 19 24 0 30 12 16 10 19 18 1 23 8 11 10 15 22 1 18 12 10 8 16 15 1 15 11 11 8 23 22 1 12 4 15 4 27 28 0 21 9 9 9 22 20 1 15 8 11 8 14 12 1 20 8 17 7 22 24 0 31 14 17 11 23 20 0 27 15 11 9 23 21 1 34 16 18 11 21 20 1 21 9 14 13 19 21 1 31 14 10 8 18 23 1 19 11 11 8 20 28 0 16 8 15 9 23 24 1 20 9 15 6 25 24 1 21 9 13 9 19 24 1 22 9 16 9 24 23 1 17 9 13 6 22 23 1 24 10 9 6 25 29 0 25 16 18 16 26 24 0 26 11 18 5 29 18 1 25 8 12 7 32 25 1 17 9 17 9 25 21 1 32 16 9 6 29 26 1 33 11 9 6 28 22 1 13 16 12 5 17 22 1 32 12 18 12 28 22 1 25 12 12 7 29 23 1 29 14 18 10 26 30 1 22 9 14 9 25 23 1 18 10 15 8 14 17 1 17 9 16 5 25 23 0 20 10 10 8 26 23 1 15 12 11 8 20 25 1 20 14 14 10 18 24 1 33 14 9 6 32 24 0 29 10 12 8 25 23 1 23 14 17 7 25 21 0 26 16 5 4 23 24 1 18 9 12 8 21 2 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 time15 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Concernovermistakes[t] = -1.52488923013411 -0.599776425471935Gender[t] + 0.812146509740823Doubtsaboutactions[t] + 0.258421861231518Parentalexpectations[t] + 0.179796229544161Parentalcritism[t] + 0.563133007199381Personalstandars[t] -0.115118381547464organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1.524889230134113.115376-0.48950.6252130.312607
Gender-0.5997764254719350.803715-0.74630.4566660.228333
Doubtsaboutactions0.8121465097408230.1305526.220900
Parentalexpectations0.2584218612315180.1332991.93870.0543950.027198
Parentalcritism0.1797962295441610.1689081.06450.2888060.144403
Personalstandars0.5631330071993810.0960335.86400
organization-0.1151183815474640.103177-1.11570.2662940.133147


Multiple Linear Regression - Regression Statistics
Multiple R0.639796340883729
R-squared0.409339357808208
Adjusted R-squared0.386023806142743
F-TEST (value)17.5564946384912
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.22044604925031e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.48420824730765
Sum Squared Residuals3056.43478799373


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12425.3674713868655-1.36747138686548
22522.08664764638172.91335235361827
31723.1955619828947-6.19556198289475
41819.6954852711489-1.69548527114887
51819.2934117319808-1.29341173198077
61619.4069284768994-3.40692847689944
72020.7589904748235-0.758990474823462
81622.1639181031645-6.1639181031645
91822.2699711701797-4.26997117017974
101720.3748373668623-3.37483736686228
112322.74516218791690.254837812083117
123022.78097723083567.21902276916444
132314.92749990525548.07250009474464
141818.9270333019304-0.927033301930446
151521.5094110329846-6.50941103298455
161217.7007097310610-5.70070973106096
172119.81495070195151.18504929804848
181515.1559582544423-0.155958254442304
192019.65033667131270.349663328687277
203126.86578360679554.13421639320452
212725.65268810851141.34731189148859
223427.02245604763796.97754395236206
232119.42195109766821.57804890233179
243120.756645283431110.2433547165689
251919.1293017221016-0.129301722101627
261620.6559948406093-4.65599484060933
272021.4552422506445-1.45524225064449
282118.09898917361772.90101082638235
292221.80503817485660.194961825143426
301719.3641178881308-2.36411788813078
312420.14126568525893.85873431474111
322530.8764051306377-5.87640513063773
332627.2180233678308-1.21802336783078
342523.87443905560151.12556094439852
351722.8568298063824-5.8568298063824
363227.61203191714374.38796808285626
373323.44863988743019.5513601125699
381321.9103787110914-8.91037871109142
393227.66536052551954.33463947448045
402525.6638628360616-0.663862836061554
412926.88284801913442.1171519808656
422221.85132745959290.148672540407081
431817.23834681111270.7616531888873
441721.6489862638793-4.64898626387931
452022.6128997275348-2.61289972753483
461520.2868033764848-5.28680337648484
472022.0348068058981-2.03480680589807
483327.90737468235525.09262531764484
492922.56661044279856.43338955720152
502326.5579698959982-3.55796989599820
512623.66996715849992.33003284150007
521818.7870370972407-0.787037097240736
532019.17535349906430.824646500935741
541111.6230304916359-0.623030491635949
552828.7621782677923-0.762178267792335
562623.14943025006482.85056974993515
572222.669269923808-0.669269923808007
581720.0517776355677-3.0517776355677
591215.8538857599063-3.85388575990632
601420.8973540189012-6.89735401890124
611720.5411139668356-3.54111396683557
622121.1874120307229-0.187412030722898
631922.7894496147904-3.78944961479037
641822.8711309424203-4.87113094242026
651018.3900018497382-8.3900018497382
662924.63707205257634.36292794742370
673118.279601733467812.7203982665322
681923.3693885717829-4.36938857178287
69919.9178025587064-10.9178025587064
702022.2903219027409-2.29032190274092
712817.462198113851310.5378018861487
721918.54687009102140.453129908978576
733023.49043661605276.50956338394726
742927.59099683312541.40900316687457
752621.93990029456904.06009970543103
762319.98118216989653.01881783010349
771322.6314806665406-9.63148066654058
782122.4832495856698-1.48324958566978
791921.2573070106616-2.25730701066161
802822.79292831075805.20707168924197
812325.3729608504198-2.37296085041982
821813.60940691489434.3905930851057
832121.1856456618628-0.185645661862829
842021.6207025203118-1.62070252031183
852319.80307235334513.19692764665485
862120.70208832490490.297911675095087
872121.6170380931145-0.617038093114464
881522.6231781689117-7.62317816891174
892826.94497625494551.05502374505455
901917.51221049328231.48778950671773
912621.11208133961044.88791866038963
921013.0189051398643-3.01890513986429
931617.5590386226172-1.55903862261723
942221.03846326497700.96153673502297
951918.54285255045510.457147449544854
963128.60839159234012.39160840765988
973125.65336066135825.34663933864183
982924.65069436641224.34930563358783
991917.86297341621281.13702658378724
1002218.74379835435233.25620164564774
1012322.20566280880560.794337191194412
1021516.6220171743863-1.62201717438634
1032021.9131730556020-1.91317305560195
1041819.3399853933777-1.33998539337772
1052321.81021532886501.18978467113505
1062520.83349250121054.16650749878949
1072116.39468028472684.60531971527317
1082419.3148508370894.68514916291101
1092525.0709120701137-0.07091207011366
1101719.4547342883026-2.45473428830264
1111314.4287552152974-1.42875521529741
1122818.03836392900459.96163607099552
1132120.48866266569780.511337334302223
1142527.9423547054043-2.94235470540426
115921.0762576763391-12.0762576763391
1161617.6939237600990-1.69392376009895
1171921.046422718448-2.04642271844802
1181719.2889309744774-2.28893097447745
1192524.36596446638290.634035533617054
1202015.41969589304674.58030410695327
1212921.445937691487.55406230852002
1221418.8999489107604-4.89994891076042
1232226.7321259935752-4.73212599357521
1241515.3865155722756-0.386515572275641
1251925.8655570594453-6.86555705944527
1262021.8185578044274-1.81855780442744
1271517.9017713795316-2.90177137953155
1282021.6120705139941-1.61207051399408
1291820.0655867958938-2.06558679589383
1303325.28989443916287.71010556083723
1312223.5892499774693-1.58924997746931
1321616.3167272058862-0.316727205886227
1331718.8852557986806-1.88525579868057
1341614.90615944557801.09384055442196
1352117.49841337800413.50158662199594
1362628.1082687097083-2.10826870970826
1371821.0102381889068-3.01023818890681
1381822.927996914261-4.92799691426099
1391718.1546868170441-1.15468681704407
1402224.5338027250514-2.53380272505139
1413024.52975012166795.47024987833214
1423027.6934119154082.30658808459201
1432429.7180440769175-5.71804407691749
1442121.8284181608956-0.828418160895604
1452125.2236239084878-4.22362390848779
1462927.23284638830291.76715361169706
1473123.08706656947737.91293343052267
1482018.80929253265491.19070746734509
1491614.63844887008581.36155112991425
1502219.34844371351372.65155628648632
1512020.1300202451636-0.130020245163564
1522827.19514913195070.804850868049288
1533826.486802788119611.5131972118804
1542219.79921935025822.2007806497418
1552025.5275587020833-5.52755870208333
1561718.5047320550995-1.50473205509950
1572824.27874680631153.72125319368852
1582223.9638509492812-1.96385094928121
1593126.52710345326474.47289654673532


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.08444205002012230.1688841000402450.915557949979878
110.04647527809209310.09295055618418610.953524721907907
120.1302788762902440.2605577525804870.869721123709757
130.08449614378396820.1689922875679360.915503856216032
140.129771754078390.259543508156780.87022824592161
150.08379025200704850.1675805040140970.916209747992951
160.06163554051475090.1232710810295020.93836445948525
170.08234060909972840.1646812181994570.917659390900272
180.1034310295336430.2068620590672860.896568970466357
190.09895158969193890.1979031793838780.901048410308061
200.1352331782480440.2704663564960870.864766821751956
210.09646720424427250.1929344084885450.903532795755728
220.2737744566577810.5475489133155620.726225543342219
230.2136506452333840.4273012904667680.786349354766616
240.5176511664818890.9646976670362220.482348833518111
250.4443088846923890.8886177693847770.555691115307611
260.4717275156773120.9434550313546230.528272484322688
270.4155779062595930.8311558125191860.584422093740407
280.3725666406401890.7451332812803780.627433359359811
290.3217301524907640.6434603049815270.678269847509236
300.2687552981522770.5375105963045540.731244701847723
310.3482603961228680.6965207922457360.651739603877132
320.3906217184295830.7812434368591650.609378281570417
330.3398600644390770.6797201288781540.660139935560923
340.3945152202145130.7890304404290250.605484779785487
350.3929607553079250.785921510615850.607039244692075
360.3993333641644590.7986667283289170.600666635835541
370.5923509832940090.8152980334119830.407649016705991
380.7855503139208670.4288993721582660.214449686079133
390.7808773361423350.4382453277153300.219122663857665
400.741294235609460.5174115287810790.258705764390540
410.7155083561001450.5689832877997090.284491643899855
420.6671625668750020.6656748662499950.332837433124998
430.6192170349781560.7615659300436870.380782965021844
440.6042043890069260.7915912219861470.395795610993074
450.5670880008136840.8658239983726320.432911999186316
460.5884240629378820.8231518741242360.411575937062118
470.5477308275949510.9045383448100970.452269172405049
480.5354011631720060.9291976736559870.464598836827994
490.6018615143629180.7962769712741650.398138485637082
500.5800826434130970.8398347131738070.419917356586903
510.5427172779294120.9145654441411760.457282722070588
520.4928461706229250.9856923412458510.507153829377075
530.4522226625462950.904445325092590.547777337453705
540.404516829329890.809033658659780.59548317067011
550.3594111897146110.7188223794292220.640588810285389
560.3325338025718930.6650676051437870.667466197428107
570.2886012291772870.5772024583545740.711398770822713
580.2633046101546980.5266092203093960.736695389845302
590.2449431823467790.4898863646935570.755056817653221
600.3030652443271510.6061304886543020.696934755672849
610.2893694471814770.5787388943629550.710630552818523
620.2511159292150760.5022318584301510.748884070784924
630.2371279442208290.4742558884416570.762872055779171
640.2663268627067880.5326537254135760.733673137293212
650.3511742427525460.7023484855050920.648825757247454
660.3493839107683090.6987678215366180.650616089231691
670.683580340507480.6328393189850390.316419659492520
680.6787796302316370.6424407395367260.321220369768363
690.8490183837324790.3019632325350420.150981616267521
700.8290295950894690.3419408098210630.170970404910531
710.9334882820124630.1330234359750750.0665117179875374
720.9172086169357370.1655827661285270.0827913830642634
730.9373879325600460.1252241348799080.0626120674399539
740.9246381546894060.1507236906211880.0753618453105942
750.9240194998811520.1519610002376950.0759805001188476
760.915891996427760.1682160071444800.0841080035722399
770.9670983795705350.06580324085893090.0329016204294654
780.959048374082740.0819032518345220.040951625917261
790.9506572679738820.09868546405223640.0493427320261182
800.9541605666398510.09167886672029770.0458394333601489
810.9454610354799970.1090779290400060.0545389645200029
820.9451310422199380.1097379155601230.0548689577800616
830.9307736687138930.1384526625722150.0692263312861075
840.916628973684820.1667420526303610.0833710263151805
850.9079566407467610.1840867185064790.0920433592532394
860.8918591864664880.2162816270670240.108140813533512
870.8694109743602930.2611780512794140.130589025639707
880.9148847233837830.1702305532324340.0851152766162169
890.897160906664860.205678186670280.10283909333514
900.8764856064129210.2470287871741590.123514393587079
910.8786052570358020.2427894859283970.121394742964198
920.8668757682637790.2662484634724420.133124231736221
930.8435961135248080.3128077729503840.156403886475192
940.815473334878340.369053330243320.18452666512166
950.7814914941078070.4370170117843860.218508505892193
960.7520793237855780.4958413524288430.247920676214422
970.7700687922926510.4598624154146970.229931207707349
980.7643692980002790.4712614039994430.235630701999721
990.7277406921975490.5445186156049020.272259307802451
1000.7028316813352580.5943366373294850.297168318664742
1010.6593776252388860.6812447495222280.340622374761114
1020.619574691481440.760850617037120.38042530851856
1030.5809601512371740.8380796975256520.419039848762826
1040.537989483789910.924021032420180.46201051621009
1050.4917965545786560.9835931091573130.508203445421344
1060.4734542948855890.9469085897711780.526545705114411
1070.4707127620936080.9414255241872150.529287237906392
1080.482821948087740.965643896175480.51717805191226
1090.4323073899086050.864614779817210.567692610091395
1100.4082286197471990.8164572394943980.591771380252801
1110.3686419823089440.7372839646178880.631358017691056
1120.59692555474990.80614889050020.4030744452501
1130.5841180318102790.8317639363794410.415881968189721
1140.5526226430355360.8947547139289280.447377356964464
1150.792882714612480.414234570775040.20711728538752
1160.7659736419846610.4680527160306770.234026358015339
1170.7516251179071930.4967497641856140.248374882092807
1180.7207752637033180.5584494725933640.279224736296682
1190.6733035518547240.6533928962905520.326696448145276
1200.7024071138004990.5951857723990030.297592886199501
1210.7541832744492820.4916334511014360.245816725550718
1220.7447946124739080.5104107750521840.255205387526092
1230.7467047019331190.5065905961337630.253295298066882
1240.6957364185148350.608527162970330.304263581485165
1250.7853527612758810.4292944774482380.214647238724119
1260.7473968292932610.5052063414134770.252603170706739
1270.7861709263383920.4276581473232160.213829073661608
1280.7564203986220960.4871592027558080.243579601377904
1290.7210571907148390.5578856185703220.278942809285161
1300.7812730453778020.4374539092443960.218726954622198
1310.730601277758280.538797444483440.26939872224172
1320.6708555137925570.6582889724148860.329144486207443
1330.6535776243338450.692844751332310.346422375666155
1340.5854589351169860.8290821297660280.414541064883014
1350.5282903907091520.9434192185816960.471709609290848
1360.585709116195080.828581767609840.41429088380492
1370.550168402151440.899663195697120.44983159784856
1380.5549610841265330.8900778317469330.445038915873467
1390.4744029772708530.9488059545417050.525597022729147
1400.3945607704880160.7891215409760320.605439229511984
1410.540144050850720.9197118982985610.459855949149280
1420.4590163229245540.9180326458491090.540983677075446
1430.376580101360570.753160202721140.62341989863943
1440.2867526795669450.5735053591338910.713247320433055
1450.303984197027430.607968394054860.69601580297257
1460.2140078427565460.4280156855130910.785992157243455
1470.3294294428760150.658858885752030.670570557123985
1480.2347005543942780.4694011087885560.765299445605722
1490.6093567596400630.7812864807198740.390643240359937


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 level50.0357142857142857OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/101cfg1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/101cfg1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/1vth41292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/1vth41292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/2vth41292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/2vth41292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/3n2zp1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/3n2zp1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/4n2zp1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/4n2zp1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/5n2zp1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/5n2zp1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/6gcga1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/6gcga1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/793fd1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/793fd1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/893fd1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/893fd1292144489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/993fd1292144489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t12921444042wi1u6z7sqx61x1/993fd1292144489.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