Home » date » 2010 » Dec » 02 »

Workshop 7 tutorial

*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: Thu, 02 Dec 2010 20:40:56 +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/02/t129132234520yawyge0skbp0s.htm/, Retrieved Thu, 02 Dec 2010 21:39:16 +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/02/t129132234520yawyge0skbp0s.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 «
2 2 1 4 3 3 3 3 3 2 3 4 3 3 4 3 3 4 2 3 4 4 4 3 3 3 3 2 3 3 3 3 3 3 2 3 3 2 2 2 3 1 2 4 3 3 2 2 2 4 4 5 4 4 5 4 3 2 2 4 2 2 3 2 3 2 2 4 4 3 2 3 4 2 2 2 2 2 2 2 3 4 2 2 3 2 4 4 3 3 3 4 3 2 3 3 2 3 2 4 4 4 3 3 3 2 2 5 3 4 2 3 3 3 5 3 3 4 3 3 2 2 4 3 2 2 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 3 2 2 2 4 2 2 2 2 4 2 2 2 3 2 2 3 3 1 1 4 3 3 3 2 2 4 3 4 4 4 4 3 3 3 2 4 3 3 2 3 3 2 2 4 3 3 2 2 2 3 3 4 3 4 3 3 2 3 3 4 4 4 4 3 4 4 3 4 4 2 4 4 2 3 2 3 4 3 3 3 3 3 3 3 4 3 3 3 2 2 2 4 4 4 4 2 4 2 2 3 2 4 2 2 3 4 3 4 3 3 3 4 2 4 3 4 4 3 4 4 3 2 2 4 3 2 3 3 3 2 2 4 3 2 2 3 1 3 3 4 4 4 4 4 3 3 3 4 3 3 4 3 3 3 2 3 2 2 2 2 3 3 3 4 3 3 3 3 2 4 3 4 4 4 4 4 3 3 3 4 3 4 4 3 1 2 3 2 2 3 3 5 2 1 5 2 1 4 2 4 2 2 4 3 2 3 2 3 3 3 4 3 2 3 3 2 4 3 4 4 4 3 4 2 3 2 4 4 4 3 4 3 2 2 5 2 2 2 2 4 2 3 4 3 3 4 3 2 3 3 4 4 3 4 3 3 3 3 4 3 2 4 3 4 4 2 3 3 1 2 2 3 3 2 4 4 3 3 4 4 2 2 4 3 2 3 3 3 2 3 5 3 4 3 4 3 2 3 4 3 3 3 3 4 2 2 3 3 4 2 3 2 3 3 3 4 4 4 4 4 1 1 4 3 4 4 1 2 5 3 4 4 4 4 4 4 2 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
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 0.530179124767959 + 0.08203483012131X1t[t] + 0.382220352569239X2t[t] + 0.125417786702747X3t[t] -0.120826659285732X4t[t] -0.0412507968502131X5t[t] + 0.165388840699340X6t[t] + 0.139655817303533X7t[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.5301791247679590.5428220.97670.3303070.165154
X1t0.082034830121310.0729221.1250.2624220.131211
X2t0.3822203525692390.0826714.62348e-064e-06
X3t0.1254177867027470.0748411.67580.0958920.047946
X4t-0.1208266592857320.082196-1.470.1436870.071844
X5t-0.04125079685021310.087366-0.47220.6375080.318754
X6t0.1653888406993400.0806412.05090.0420390.021019
X7t0.1396558173035330.076951.81490.0715650.035783


Multiple Linear Regression - Regression Statistics
Multiple R0.455185301715151
R-squared0.207193658897513
Adjusted R-squared0.169696061683206
F-TEST (value)5.52551828090096
F-TEST (DF numerator)7
F-TEST (DF denominator)148
p-value1.15362556940557e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.781193377548189
Sum Squared Residuals90.3189377825218


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
122.00704188999157-0.00704188999156803
232.936871435829410.0631285641705947
332.431225500664090.568774499335907
432.602681851845880.397318148154119
532.082085424826730.91791457517327
632.002182754436640.997817245563357
723.75154643721094-1.75154643721094
832.411683881393240.588316118606763
932.103046742575750.896953257424245
1041.995459467288402.00454053271160
1132.648791784251040.351208215748962
1232.894768222101590.105231777898412
1322.30921961654619-0.309219616546191
1432.308040391714020.69195960828598
1533.45128954683689-0.451289546836892
1623.02497377643316-1.02497377643316
1732.728099638548630.271900361451372
1832.934004504381140.0659954956188643
1923.03921180703395-1.03921180703395
2022.42592191199402-0.425921911994024
2112.64120567287237-1.64120567287237
2243.073660321684670.926339678315331
2333.06953595784677-0.06953595784677
2422.7644912998439-0.764491299843897
2532.84983751452860.150162485471398
2633.2133161389882-0.213316138988202
2743.341046663651940.658953336348061
2832.771482595130070.228517404869935
2932.713861607947840.286138392052158
3022.96589246816755-0.965892468167552
3122.27568231858971-0.275682318589713
3243.136053014513670.863946985486327
3343.359875821669740.64012417833026
3423.14911182028229-1.14911182028229
3522.91105098252544-0.911050982525436
3633.23904916238401-0.239049162384009
3733.06906919426765-0.0690691942676537
3832.517335637161180.482664362838824
3932.970664173814330.0293358261856662
4043.239049162384010.760950837615991
4132.668930900374860.331069099625144
4222.41158336337179-0.411583363371789
4312.20527053377680-1.20527053377680
4422.72596747881740-0.725967478817404
4532.658983658571380.341016341428616
4633.11113297039237-0.111132970392371
4723.13686599378818-1.13686599378818
4822.57234163905101-0.572341639051014
4932.523918968684870.476081031315134
5033.07152816195345-0.071528161953445
5132.868934680684330.131065319315668
5222.63934152127908-0.639341521279079
5323.17683704778477-1.17683704778477
5422.54506086466366-0.545060864663658
5532.836680471340250.163319528659751
5632.835867492065740.164132507934255
5722.80895524383777-0.808955243837767
5832.959737527776940.0402624722230577
5913.01114998369511-2.01114998369511
6033.18142817520179-0.181428175201785
6112.43516085141532-1.43516085141532
6233.33660176595972-0.336601765959725
6322.82778440185557-0.827784401855569
6422.97525530123135-0.97525530123135
6532.477264065143130.522735934856866
6622.89430145852247-0.894301458522472
6732.851385265520150.148614734479849
6822.68599642482081-0.685996424820811
6932.659552005329010.340447994670987
7012.41787944438907-1.41787944438907
7122.69143996911543-0.69143996911543
7222.81344585323333-0.813445853233333
7323.08458696772206-1.08458696772206
7422.70246485257256-0.70246485257256
7532.949790285973470.0502097140265289
7622.81013446866994-0.810134468669938
7722.89216929879125-0.892169298791248
7822.34561127784146-0.345611277841461
7922.91635457119551-0.916354571195506
8012.24406236294123-1.24406236294123
8122.85138526552015-0.85138526552015
8232.988582115137890.0114178848621071
8343.112778958803660.887221041196342
8432.070590432031710.929409567968291
8533.34624866914350-0.346248669143496
8632.464305777395970.535694222604032
8731.833382011152461.16661798884754
8843.494940511556260.505059488443742
8943.087045935407850.912954064592148
9032.728099638548630.271900361451372
9143.211183979256980.788816020743022
9243.454969457559670.545030542440335
9343.578255084531190.421744915468811
9433.11645886952643-0.116458869526431
9532.743617412003030.256382587996965
9622.76321155699028-0.763211556990277
9733.05777295691382-0.0577729569138207
9832.61574065761450.384259342385504
9943.167940978300090.83205902169991
10033.32955167085692-0.329551670856919
10143.537004287680980.462995712319024
10233.47166645584624-0.471666455846243
10333.71337857423435-0.713378574234345
10432.552593785327630.447406214672374
10532.697814925338910.302185074661094
10642.699966447283671.30003355271633
10733.37411385227053-0.374113852270527
10843.047074881411260.952925118588741
10932.797558488462480.202441511537515
11033.23492479854611-0.234924798546110
11122.68930780938421-0.689307809384206
11233.27570883181721-0.275708831817207
11332.975523309369280.0244766906307223
11443.251155033253570.748844966746429
11543.477290578370630.522709421629372
11642.850105522666531.14989447733347
11742.989761339970061.01023866002994
11822.72468773596378-0.724687735963784
11933.01218297880248-0.0121829788024757
12033.05556593538391-0.0555659353839127
12133.09634996865501-0.0963499686550095
12243.180983722086660.81901627791334
12332.813912616812450.186087383187551
12443.37198169253930.628018307460697
12543.096349968655010.90365003134499
12632.445463531264880.55453646873512
12743.357743661938520.642256338061484
12832.988582115137890.0114178848621071
12932.610499214519840.38950078548016
13011.81713868833171-0.817138688331712
13143.232325875235770.76767412476423
13243.195221752687450.804778247312554
13322.56169906313360-0.561699063133597
13422.73295877410357-0.732958774103572
13543.437786287953150.562213712046848
13632.975523309369280.0244766906307223
13743.686489701627420.313510298372578
13822.31805354045546-0.318053540455458
13953.108187831386641.89181216861336
14033.5632040746559-0.563204074655898
14142.768070692545221.23192930745478
14233.15183879610601-0.151838796106009
14343.123362734904440.876637265095563
14422.59131075269336-0.591310752693364
14532.893488479247970.106511520752032
14613.13973292523645-2.13973292523645
14722.80804174654181-0.808041746541814
14853.314360705357081.68563929464292
14943.209904236403360.790095763596642
15042.854696650083551.14530334991645
15132.786899850563020.213100149436978
15243.354432277375120.645567722624878
15322.48553510328292-0.485535103282922
15442.975523309369281.02447669063072
15543.516509733511070.483490266488933
15632.671213423083450.32878657691655


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2190613662640040.4381227325280070.780938633735996
120.1135946017258040.2271892034516080.886405398274196
130.05660164378357510.1132032875671500.943398356216425
140.1190649679994330.2381299359988660.880935032000567
150.0856222635454840.1712445270909680.914377736454516
160.2338272673029070.4676545346058130.766172732697094
170.1604011212874440.3208022425748890.839598878712556
180.1038121989993440.2076243979986870.896187801000656
190.08451043915649420.1690208783129880.915489560843506
200.09373237241120210.1874647448224040.906267627588798
210.3523315797311860.7046631594623710.647668420268814
220.5517088561735360.8965822876529270.448291143826464
230.53673202433190.9265359513362010.463267975668100
240.545878223761170.9082435524776610.454121776238830
250.4708230272388130.9416460544776270.529176972761187
260.4277722927106120.8555445854212230.572227707289388
270.4074484495176530.8148968990353050.592551550482347
280.3693695687696560.7387391375393120.630630431230344
290.3174938935412520.6349877870825030.682506106458748
300.2750736475184940.5501472950369880.724926352481506
310.2222672177418370.4445344354836750.777732782258163
320.2330090206034640.4660180412069270.766990979396536
330.2442532544656050.488506508931210.755746745534395
340.2678327297786130.5356654595572260.732167270221387
350.3392591923036850.678518384607370.660740807696315
360.2870805857307140.5741611714614290.712919414269286
370.2388511850097310.4777023700194610.76114881499027
380.2154844899356920.4309689798713840.784515510064308
390.1756750083722110.3513500167444220.82432499162779
400.2126512043423660.4253024086847320.787348795657634
410.1848560644644050.369712128928810.815143935535595
420.2128152649818900.4256305299637810.78718473501811
430.4059994143575310.8119988287150620.594000585642469
440.3862566964828760.7725133929657520.613743303517124
450.3412385359605470.6824770719210930.658761464039453
460.3118251402279650.623650280455930.688174859772035
470.4158242197818840.8316484395637680.584175780218116
480.3960607024592340.7921214049184690.603939297540766
490.3682421043299740.7364842086599470.631757895670026
500.3281145246618460.6562290493236930.671885475338154
510.2949039266022490.5898078532044990.705096073397751
520.2706387912058190.5412775824116380.729361208794181
530.3247446437905860.6494892875811730.675255356209414
540.3036502153851060.6073004307702120.696349784614894
550.2620968974620540.5241937949241080.737903102537946
560.2268980414913130.4537960829826270.773101958508687
570.2311363299757020.4622726599514040.768863670024298
580.1944159595297810.3888319190595620.805584040470219
590.2907145461311090.5814290922622190.70928545386889
600.2507878069052190.5015756138104370.749212193094781
610.3302955423699950.660591084739990.669704457630005
620.3040593777180230.6081187554360470.695940622281977
630.2939131791508700.5878263583017390.70608682084913
640.3094872523852910.6189745047705830.690512747614709
650.2837791731442730.5675583462885460.716220826855727
660.3027961604245380.6055923208490760.697203839575462
670.2895608552561100.5791217105122190.71043914474389
680.2691678261322220.5383356522644440.730832173867778
690.2342584578510730.4685169157021460.765741542148927
700.3107347852001840.6214695704003670.689265214799816
710.3157945569637390.6315891139274770.684205443036261
720.3283610044808820.6567220089617640.671638995519118
730.3703673328561970.7407346657123940.629632667143803
740.3638550423260080.7277100846520170.636144957673991
750.3362704090555390.6725408181110790.66372959094446
760.3449026770057110.6898053540114230.655097322994289
770.378019231301770.756038462603540.62198076869823
780.3561130647303770.7122261294607540.643886935269623
790.4538714003123440.9077428006246890.546128599687656
800.613287304898430.773425390203140.38671269510157
810.6597397452411750.680520509517650.340260254758825
820.6183710824956340.7632578350087320.381628917504366
830.714298154871670.5714036902566580.285701845128329
840.7334300087123010.5331399825753980.266569991287699
850.7228101253600030.5543797492799950.277189874639998
860.7030541996136370.5938916007727270.296945800386363
870.7150298778265840.5699402443468320.284970122173416
880.7085965831126660.5828068337746680.291403416887334
890.7658066297379360.4683867405241280.234193370262064
900.7309116912659420.5381766174681160.269088308734058
910.7444964130965320.5110071738069350.255503586903468
920.7371799140496540.5256401719006920.262820085950346
930.7268224725914320.5463550548171360.273177527408568
940.6903923887143870.6192152225712260.309607611285613
950.6531467676802210.6937064646395590.346853232319779
960.7213562671487360.5572874657025280.278643732851264
970.6901376149711640.6197247700576720.309862385028836
980.6574526746194650.685094650761070.342547325380535
990.6846549400498550.630690119900290.315345059950145
1000.6467002440193850.706599511961230.353299755980615
1010.6265504364644280.7468991270711430.373449563535572
1020.5905834100214790.8188331799570420.409416589978521
1030.7704816229439520.4590367541120970.229518377056048
1040.7556791103733030.4886417792533930.244320889626696
1050.7818020026698190.4363959946603620.218197997330181
1060.7928144209027840.4143711581944320.207185579097216
1070.7593915684706670.4812168630586670.240608431529333
1080.7447476681298190.5105046637403620.255252331870181
1090.709722701016480.5805545979670410.290277298983520
1100.6711475806019530.6577048387960940.328852419398047
1110.8114617122740390.3770765754519220.188538287725961
1120.8000512604752840.3998974790494320.199948739524716
1130.7738515723320010.4522968553359980.226148427667999
1140.7623948698779050.475210260244190.237605130122095
1150.764973524403810.4700529511923810.235026475596190
1160.7841348352745880.4317303294508240.215865164725412
1170.7942389791177720.4115220417644570.205761020882228
1180.8890919982284020.2218160035431970.110908001771598
1190.8740304150426730.2519391699146540.125969584957327
1200.8395857319211860.3208285361576290.160414268078814
1210.7998921307927680.4002157384144640.200107869207232
1220.8781533522887450.243693295422510.121846647711255
1230.8720088323595270.2559823352809460.127991167640473
1240.8428246993593430.3143506012813150.157175300640657
1250.901490253297580.197019493404840.09850974670242
1260.8752637260726450.2494725478547100.124736273927355
1270.8438883246751840.3122233506496320.156111675324816
1280.8190538527605450.361892294478910.180946147239455
1290.7717066181543770.4565867636912470.228293381845623
1300.7441481511959220.5117036976081570.255851848804078
1310.6989137331913170.6021725336173660.301086266808683
1320.9373536762174250.1252926475651490.0626463237825747
1330.9218781310534390.1562437378931230.0781218689465615
1340.8887051374571520.2225897250856960.111294862542848
1350.8993081351405250.2013837297189500.100691864859475
1360.8756056815099560.2487886369800870.124394318490044
1370.8262775233590270.3474449532819470.173722476640973
1380.7830663740738570.4338672518522850.216933625926142
1390.7610659768460480.4778680463079030.238934023153952
1400.683761681325730.6324766373485410.316238318674271
1410.7690284480202520.4619431039594960.230971551979748
1420.7198725198839760.5602549602320470.280127480116024
1430.6188360376208590.7623279247582820.381163962379141
1440.7837607432655170.4324785134689660.216239256734483
1450.774819477161830.450361045676340.22518052283817


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/02/t129132234520yawyge0skbp0s/101h741291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/101h741291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/1mpsv1291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/1mpsv1291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/2mpsv1291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/2mpsv1291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/3mpsv1291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/3mpsv1291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/4fy9y1291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/4fy9y1291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/5fy9y1291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/5fy9y1291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/6fy9y1291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/6fy9y1291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/78q811291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/78q811291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/81h741291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/81h741291322444.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/91h741291322444.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t129132234520yawyge0skbp0s/91h741291322444.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by