Home » date » 2010 » Dec » 05 »

p_Stress_MR2v3

*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, 05 Dec 2010 16:08:01 +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/05/t1291565306g09bietb3mge5qm.htm/, Retrieved Sun, 05 Dec 2010 17:08:37 +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/05/t1291565306g09bietb3mge5qm.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
23 10 0 0 53 7 12 2 4 21 6 0 0 86 4 11 4 3 21 13 0 0 66 6 14 7 5 21 12 1 0 67 5 12 3 3 24 8 0 0 76 4 21 7 6 22 6 0 0 78 3 12 2 5 21 10 0 0 53 5 22 7 6 22 10 0 0 80 6 11 2 6 21 9 0 0 74 5 10 1 5 20 9 0 0 76 6 13 2 5 22 7 1 0 79 7 10 6 3 21 5 0 0 54 6 8 1 5 21 14 1 0 67 7 15 1 7 23 6 0 0 87 6 10 1 5 22 10 1 0 58 4 14 2 5 23 10 1 0 75 6 14 2 3 22 7 0 0 88 4 11 2 5 24 10 1 0 64 5 10 1 6 23 8 0 0 57 3 13 7 5 21 6 1 0 66 3 7 1 2 23 10 0 0 54 4 12 2 5 23 12 0 0 56 5 14 4 4 21 7 1 0 86 3 11 2 6 20 15 0 0 80 7 9 1 3 32 8 1 0 76 7 11 1 5 22 10 0 0 69 4 15 5 4 21 13 1 0 67 4 13 2 5 21 8 0 0 80 5 9 1 2 21 11 1 0 54 6 15 3 2 22 7 0 0 71 5 10 1 5 21 9 0 0 84 4 11 2 2 21 10 1 0 74 6 13 5 2 21 8 1 0 71 5 8 2 2 22 15 1 0 63 5 20 6 5 21 9 1 0 71 6 12 4 5 21 7 0 0 76 2 10 1 1 21 11 1 0 69 6 10 3 5 21 9 1 0 74 7 9 6 2 23 8 0 0 75 5 14 7 6 21 8 1 0 54 5 8 4 1 23 12 0 0 69 5 11 5 3 23 13 0 0 68 6 13 3 2 21 9 0 0 75 4 11 2 5 21 11 1 0 75 6 11 2 3 20 8 0 0 72 5 10 2 4 21 10 1 0 67 5 14 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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PStress[t] = + 7.78523490126505 -0.110074879874858AGE[t] + 0.699382957944335Pstress_M[t] -0.884853431871234Pstress_OKT[t] -0.0337936158398925BelInSprt[t] + 0.202477782082303KunnenRekRel[t] + 0.40160750304506Depressie[t] -0.213401401711012Slaapgebrek[t] + 0.188622682629067ToekZorgen[t] + 0.0134464221743947t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.785234901265052.1242813.66490.0003570.000179
AGE-0.1100748798748580.066625-1.65210.1008810.050441
Pstress_M0.6993829579443350.3343422.09180.0383710.019185
Pstress_OKT-0.8848534318712340.545914-1.62090.1074330.053717
BelInSprt-0.03379361583989250.016095-2.09960.0376690.018834
KunnenRekRel0.2024777820823030.1066421.89870.059790.029895
Depressie0.401607503045060.0610036.583400
Slaapgebrek-0.2134014017110120.091801-2.32460.021620.01081
ToekZorgen0.1886226826290670.1096841.71970.0878330.043917
t0.01344642217439470.0066062.03550.0438030.021902


Multiple Linear Regression - Regression Statistics
Multiple R0.645940382564006
R-squared0.417238977826935
Adjusted R-squared0.377505271769681
F-TEST (value)10.5008824806252
F-TEST (DF numerator)9
F-TEST (DF denominator)132
p-value3.79685172191557e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.88283492916378
Sum Squared Residuals467.948892903251


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11010.0402198850145-0.0402198850144854
267.53416040887909-1.53416040887909
3139.570298381276223.42970161872378
4129.720001598968542.27999840103146
5811.5239500673814-3.5239500673814
668.75139803406387-2.75139803406387
71013.2624060007997-3.26240600079965
8109.105152172563790.894847827436213
998.852128603606970.147871396393026
10910.1019615634829-1.10196156348291
1178.2600646371772-1.26006463717720
1258.96760296292019-3.96760296292019
131412.63209100577621.36790899422382
1468.46237173089294-2.46237173089294
151011.2533638965480-1.25336389654803
161010.6099541684759-0.609954168475865
1778.36224279862053-1.36224279862053
18109.868863562524280.131136437475717
1988.86039306958389-0.860393069583885
2067.7941250110018-1.79412501100181
21109.856544049044650.143455950955347
221210.19267054166061.80732945833940
2379.30611130171264-2.30611130171264
24158.587240816919816.41275918308019
2589.29480647324807-1.29480647324807
26109.902942423566180.0970575764338246
271310.81904579691152.18095420308847
2887.937373378948860.0626266210511408
291111.7141567678354-0.714156767835436
3079.12580943691408-2.12580943691408
3198.229874004409280.770125995590721
32109.848605908048630.151394091951373
3388.39312208556813-0.393122085568129
341513.09839503217071.90160496782932
35910.3679879686446-1.36798796864464
3677.78567069387267-0.785670693872671
37119.87265444029411.12734555970590
3898.311930809286040.688069190713955
3989.51622217779245-1.51622217779245
4088.44631302401597-0.446313024015975
41128.401988963580233.59801103641977
42139.69310191055993.3068980894401
4399.26124166094825-0.261241660948248
441110.00178123997350.99821876002655
4589.11183782909975-1.11183782909975
461011.3013677380943-1.30136773809426
471313.4307325212421-0.430732521242069
481210.67391572437011.32608427562992
491210.66022794372871.33977205627133
5098.752356891322370.247643108677627
5189.89326899831626-1.89326899831626
5298.724219620053250.275780379946752
53128.836021901087533.16397809891247
541211.47943108053600.520568919463959
551614.66559996367301.33440003632697
561110.07159955577490.928400444225084
57139.51252447915763.48747552084240
581010.3216644783409-0.321664478340856
59910.2956868329553-1.29568683295532
60149.490790410787314.50920958921269
611310.60671102311962.39328897688043
621210.32258512851371.67741487148631
63910.0703879502693-1.07038795026928
64910.5632524747759-1.56325247477587
651010.486721706027-0.486721706027003
6689.5793467493503-1.57934674935030
6799.24578658864099-0.245786588640989
6898.465738328192150.534261671807852
69118.633915375863592.36608462413641
7078.80549380432442-1.80549380432442
711110.90696488272710.0930351172728896
7299.3893048960048-0.389304896004795
73118.976842336422032.02315766357797
7499.24736093119316-0.247360931193159
75810.0592938584649-2.05929385846488
7698.015945853460840.98405414653916
7789.35479694520968-1.35479694520968
7898.81729893403870.182701065961309
79109.077239879511920.92276012048808
8099.974479729224-0.974479729223997
811713.55929904519213.44070095480795
8278.78186156016362-1.78186156016362
831110.63676281407710.363237185922887
8499.0231151075045-0.0231151075044978
85109.329265430022070.670734569977929
86118.71752330315642.28247669684361
8788.31174248041793-0.311742480417927
881211.58337690190080.416623098099199
89109.401824887580250.598175112419747
9079.51884643363178-2.51884643363178
9198.877025890128560.122974109871439
9278.16213537368667-1.16213537368667
931211.07343795763830.926562042361721
9489.4068526894538-1.40685268945379
951310.55170742993902.44829257006099
96911.0392156771744-2.03921567717440
971512.98833447980352.01166552019651
9888.63349779014939-0.63349779014939
991412.03479189373061.96520810626942
1001413.60625218291690.393747817083087
101910.0253966532017-1.02539665320169
1021311.50685553401631.49314446598374
103118.686306975654022.31369302434598
1041012.0054491327323-2.00544913273233
10569.98283585525926-3.98283585525926
10688.68320010245912-0.683200102459116
1071011.1199206128905-1.11992061289055
108108.03577065507631.96422934492371
109109.484957157324560.515042842675444
1101211.54966359714620.450336402853763
111109.40311734485610.596882655143907
11299.193585604767-0.193585604767001
11397.115341169590671.88465883040933
114118.971584718759752.02841528124025
11578.76192112009075-1.76192112009075
11678.7191757970052-1.71917579700521
11758.24361510675914-3.24361510675914
11899.26109255574654-0.261092555746537
1191112.3310448112959-1.33104481129592
1201512.60735062985852.39264937014146
12197.661714530317281.33828546968272
122910.0075716097963-1.00757160979628
12389.4994977946908-1.49949779469080
1241316.2874655991195-3.28746559911946
1251011.1308475217352-1.13084752173516
1261311.74089121724341.25910878275656
12798.539623093812470.460376906187525
1281110.59876124858960.401238751410407
129811.1000726017093-3.10007260170932
130109.237493140332640.762506859667358
13199.77517334159996-0.775173341599965
13288.8399454368709-0.839945436870903
13388.46435079429643-0.464350794296430
1341311.33563238907621.66436761092384
1351111.3968288846033-0.396828884603318
136810.7873593346059-2.78735933460588
1371210.22481954661361.77518045338641
1381512.98384464215802.01615535784203
1391111.3897624558432-0.389762455843214
1401010.5791078997774-0.579107899777426
14158.56632923894461-3.56632923894462
142117.608799406149193.39120059385081


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.498089578974620.996179157949240.50191042102538
140.586115452604070.8277690947918610.413884547395931
150.72396060805610.55207878388780.2760393919439
160.7843689727875640.4312620544248720.215631027212436
170.8252483486385680.3495033027228650.174751651361432
180.7796006684439760.4407986631120470.220399331556024
190.8388455070558790.3223089858882430.161154492944121
200.7834641789598330.4330716420803340.216535821040167
210.8465121895433430.3069756209133140.153487810456657
220.9065311843320270.1869376313359450.0934688156679726
230.8884484606507660.2231030786984670.111551539349234
240.9812064669437060.03758706611258910.0187935330562946
250.9734754219083670.05304915618326560.0265245780916328
260.9610099368139740.07798012637205140.0389900631860257
270.9584707649997390.08305847000052270.0415292350002613
280.9522461941372260.09550761172554720.0477538058627736
290.960883065258810.07823386948237950.0391169347411897
300.9702176746583960.05956465068320820.0297823253416041
310.9584976292466970.08300474150660520.0415023707533026
320.9504648070992630.09907038580147460.0495351929007373
330.9388735444698910.1222529110602180.0611264555301088
340.9304664093656120.1390671812687760.0695335906343879
350.9398439408134220.1203121183731570.0601560591865783
360.9228544806064280.1542910387871440.077145519393572
370.8993517987929860.2012964024140290.100648201207014
380.8765917381061960.2468165237876080.123408261893804
390.8712718699801590.2574562600396820.128728130019841
400.8466582320644370.3066835358711260.153341767935563
410.9013099818195160.1973800363609680.0986900181804842
420.910120118576530.1797597628469420.0898798814234708
430.888919418946960.2221611621060810.111080581053041
440.862967544711720.2740649105765600.137032455288280
450.8655889371493290.2688221257013430.134411062850671
460.8650731813989050.2698536372021900.134926818601095
470.8411836180086980.3176327639826040.158816381991302
480.8138707000424880.3722585999150240.186129299957512
490.7927290294516270.4145419410967460.207270970548373
500.7535386392912990.4929227214174030.246461360708701
510.7743176535361740.4513646929276530.225682346463827
520.7401210144434650.519757971113070.259878985556535
530.7774452226663640.4451095546672710.222554777333636
540.74020903461760.5195819307647990.259790965382400
550.7274906633480340.5450186733039320.272509336651966
560.6903196279010490.6193607441979010.309680372098951
570.741873222139390.516253555721220.25812677786061
580.7032395222205740.5935209555588520.296760477779426
590.6992674692533650.601465061493270.300732530746635
600.7455869618934890.5088260762130210.254413038106511
610.7479243098043720.5041513803912560.252075690195628
620.778437907519720.4431241849605590.221562092480280
630.8250666327791620.3498667344416750.174933367220838
640.8339427256353260.3321145487293480.166057274364674
650.8391924945037650.3216150109924690.160807505496235
660.8343981730813010.3312036538373980.165601826918699
670.805358920008060.3892821599838800.194641079991940
680.7721757895163930.4556484209672150.227824210483607
690.7934351153638730.4131297692722540.206564884636127
700.8113620452128230.3772759095743540.188637954787177
710.7791909335494320.4416181329011360.220809066450568
720.775679225550180.4486415488996420.224320774449821
730.7884096531416130.4231806937167740.211590346858387
740.7520216758635610.4959566482728780.247978324136439
750.754311312618980.4913773747620390.245688687381020
760.7329286327702880.5341427344594240.267071367229712
770.7127525652061050.574494869587790.287247434793895
780.6753566476740450.649286704651910.324643352325955
790.630859005467710.7382819890645790.369140994532289
800.6042483621339620.7915032757320760.395751637866038
810.6745063685921410.6509872628157170.325493631407859
820.6935624771217530.6128750457564940.306437522878247
830.6549411160421210.6901177679157580.345058883957879
840.6112015869929420.7775968260141150.388798413007058
850.5616734173472050.876653165305590.438326582652795
860.6082456129599220.7835087740801570.391754387040078
870.5628398412436180.8743203175127640.437160158756382
880.515479554586580.969040890826840.48452044541342
890.4777238746439470.9554477492878930.522276125356053
900.541202028545570.917595942908860.45879797145443
910.4871422765139880.9742845530279750.512857723486012
920.4759809767792340.9519619535584690.524019023220766
930.4278333083105930.8556666166211860.572166691689407
940.4281168055966340.8562336111932680.571883194403366
950.4880110146332380.9760220292664770.511988985366762
960.5164715090575340.9670569818849310.483528490942466
970.5187223097665720.9625553804668560.481277690233428
980.4741517218766720.9483034437533440.525848278123328
990.50553801071870.98892397856260.4944619892813
1000.4740508995879310.9481017991758620.525949100412069
1010.4621187742810040.9242375485620070.537881225718996
1020.4573109182829670.9146218365659350.542689081717032
1030.5246327808724150.950734438255170.475367219127585
1040.525256942330470.949486115339060.47474305766953
1050.7085084909680070.5829830180639860.291491509031993
1060.6870358697837880.6259282604324250.312964130216212
1070.7146600818818940.5706798362362120.285339918118106
1080.6867352838898380.6265294322203240.313264716110162
1090.6317655929237370.7364688141525250.368234407076263
1100.630898077817170.738203844365660.36910192218283
1110.6015554441548260.7968891116903480.398444555845174
1120.5370385082581820.9259229834836360.462961491741818
1130.4784587376089330.9569174752178660.521541262391067
1140.4809221123334670.9618442246669350.519077887666533
1150.441217295391430.882434590782860.55878270460857
1160.383333299348630.766666598697260.61666670065137
1170.4961191004846440.9922382009692870.503880899515356
1180.4250335708002440.8500671416004890.574966429199756
1190.4131002507359720.8262005014719440.586899749264028
1200.784004417919940.4319911641601180.215995582080059
1210.724205185276940.5515896294461190.275794814723060
1220.6538767693534930.6922464612930150.346123230646507
1230.5847650017522510.8304699964954990.415234998247749
1240.5101245646137720.9797508707724560.489875435386228
1250.4133593197360430.8267186394720860.586640680263957
1260.3427721831997360.6855443663994720.657227816800264
1270.3064339973667620.6128679947335230.693566002633238
1280.2084674549544840.4169349099089680.791532545045516
1290.2379337969997160.4758675939994320.762066203000284


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


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/19ujw1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/19ujw1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/29ujw1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/29ujw1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/39ujw1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/39ujw1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/4jl0h1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/4jl0h1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/5jl0h1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/5jl0h1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/6jl0h1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/6jl0h1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/7uczk1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/7uczk1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/853hn1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/853hn1291565270.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/953hn1291565270.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t1291565306g09bietb3mge5qm/953hn1291565270.ps (open in new window)


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