Home » date » 2010 » Dec » 14 »

Multiple Linear Regression - Celebrity 1

*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: Tue, 14 Dec 2010 13:02:24 +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/14/t1292331660w0w02thaiwqhhpa.htm/, Retrieved Tue, 14 Dec 2010 14:01:04 +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/14/t1292331660w0w02thaiwqhhpa.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 «
6 2 1 1 3 73 62 66 4 1 1 1 1 58 54 54 5 1 1 1 3 68 41 82 4 1 1 1 3 62 49 61 4 1 1 2 3 65 49 65 6 1 1 1 3 81 72 77 6 1 1 1 1 73 78 66 4 2 1 4 3 64 58 66 4 1 1 1 3 68 58 66 6 1 1 1 1 51 23 48 4 1 1 1 1 68 39 57 6 1 1 1 3 61 63 80 5 1 1 1 1 69 46 60 4 1 1 3 3 73 58 70 6 2 1 1 3 61 39 85 3 2 1 1 1 62 44 59 5 1 1 1 1 63 49 72 6 1 1 6 1 69 57 70 4 2 1 1 3 47 76 74 6 2 1 1 1 66 63 70 2 1 1 1 3 58 18 51 7 2 1 1 3 63 40 70 5 1 1 1 1 69 59 71 2 2 1 1 3 59 62 72 4 1 1 1 1 59 70 50 4 2 1 1 4 63 65 69 6 2 1 1 3 65 56 73 6 1 1 1 3 65 45 66 5 2 1 1 3 71 57 73 6 1 1 4 3 60 50 58 6 2 1 1 1 81 40 78 4 1 1 1 3 67 58 83 6 2 1 1 3 66 49 76 6 1 1 1 3 62 49 77 6 1 1 1 3 63 27 79 2 2 1 1 1 73 51 71 4 2 1 1 3 55 75 79 5 1 1 1 1 59 65 60 3 1 1 1 2 64 47 73 7 2 1 1 3 63 49 70 5 1 1 1 1 64 65 42 3 1 1 1 1 73 61 74 8 1 1 1 3 54 46 68 8 1 1 1 3 76 69 83 5 2 1 2 1 74 55 62 6 2 1 1 3 63 78 79 3 2 1 1 3 73 58 61 5 2 1 1 3 67 34 86 4 2 1 2 3 68 67 64 5 1 1 4 3 66 45 75 5 2 1 1 1 62 68 59 6 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Celebrity[t] = + 1.43920785893858 -0.478161596531039Gender[t] + 1.68226050071978Age[t] + 0.00423606441239899Raised[t] + 0.132214711993717Marital[t] + 0.00306708618950928NV[t] + 0.00539714070616665ANX[t] + 0.0275617336070562GR[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.439207858938581.6262750.8850.3777110.188855
Gender-0.4781615965310390.238367-2.0060.0468120.023406
Age1.682260500719781.0062191.67190.0968170.048409
Raised0.004236064412398990.1338590.03160.97480.4874
Marital0.1322147119937170.1244421.06250.2898840.144942
NV0.003067086189509280.0166030.18470.853710.426855
ANX0.005397140706166650.0092520.58340.5606060.280303
GR0.02756173360705620.0131872.090.0384490.019224


Multiple Linear Regression - Regression Statistics
Multiple R0.300778597585664
R-squared0.0904677647655988
Adjusted R-squared0.0443320716739987
F-TEST (value)1.96090615970545
F-TEST (DF numerator)7
F-TEST (DF denominator)138
p-value0.0646904918120191
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.36325856776735
Sum Squared Residuals256.469401317569


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
164.943619800672041.05638019932796
244.737427751439-0.737427751439003
355.73409374913894-0.734093749138936
445.18007195190303-1.18007195190303
545.30375620931218-1.30375620931218
665.803468563458440.196531436541558
765.243706224514320.756293775485685
844.90713565537899-0.90713565537899
945.38485740343087-1.38485740343087
1064.383276384578931.61672361542107
1144.76982670356276-0.769826703562764
1265.776237774133930.223762225866075
1354.893358975516610.106641024483392
1445.51891189763144-1.51891189763144
1565.306353468690170.693646531309833
1634.35537176063961-1.35537176063961
1755.22188868378273-0.221888683782726
1865.2495251814170.750474818583002
1945.15992939848759-1.15992939848759
2064.773364848492441.22663515150756
2124.72487490918327-2.72487490918327
2274.904458777669512.09554122233049
2355.26670087437439-0.266700874374392
2425.06605099566125-3.06605099566125
2544.71660215449895-0.716602154498953
2645.14404027371034-1.14404027371034
2765.079632402168360.920367597831637
2865.305493315682180.694506684317824
2955.10343206001159-0.103432060011586
3065.109357912646210.89064208735379
3164.915730773949691.08426922605031
3245.85033978856132-1.85033978856132
3365.127604704235870.872395295764125
3465.621059689615930.378940310384068
3565.560513147483890.439486852516112
3624.75763049695206-2.75763049695206
3745.31687761533277-1.31687761533277
3854.965233787038680.0347662129613183
3935.37393793416068-2.37393793416068
4074.953033044025012.04696695597499
4154.484458013059220.515541986940783
4235.37244870136593-2.37244870136593
4385.332275975517852.66772402448215
4485.937312112034732.06268788796527
4554.538466607915130.461533392084873
4665.357605726967350.642394273032652
4734.7842225698121-1.7842225698121
4855.32533201590345-0.325332015903446
4944.90438267045362-0.904382670453618
5055.56932419757239-0.569324197572388
5154.484903137587610.515096862412386
5265.321018730062950.678981269937045
5354.889010104913830.110989895086174
5465.30014275347750.699857246522498
5565.124509270618970.875490729381035
5644.63906759486418-0.63906759486418
5785.805891643261432.19410835673857
5864.545710798348061.45428920165194
5944.67753466745255-0.67753466745255
6064.500933558109491.49906644189051
6154.378185649849060.621814350150941
6255.55894605885185-0.558946058851848
6365.409298062700170.590701937299834
6465.558624055658590.44137594434141
6564.823849604482031.17615039551797
6664.498920970383121.50107902961688
6764.733669837512211.26633016248779
6864.971601342010941.02839865798906
6974.865687734170532.13431226582947
7045.1818882881658-1.1818882881658
7145.3526141629817-1.3526141629817
7234.59586116947693-1.59586116947693
7365.149837273447060.850162726552943
7455.35898171795395-0.358981717953955
7555.21272946731273-0.212729467312726
7635.08089440567759-2.08089440567759
7755.08472402213396-0.0847240221339615
7844.45029572083981-0.450295720839812
7935.08401255010695-2.08401255010695
8075.567986315823751.43201368417625
8144.79056872697555-0.790568726975553
8245.31718563036399-1.31718563036399
8355.49094906704222-0.490949067042221
8465.131891316218330.868108683781672
8525.32136273460742-3.32136273460742
8624.12673566808075-2.12673566808075
8765.875249464458460.124750535541543
8844.42023047439995-0.420230474399951
8955.16767270159717-0.167672701597171
9064.786531469369231.21346853063077
9175.293982646886721.70601735311328
9284.986838457750113.01316154224989
9365.0376279948340.962372005165996
9465.035537911963470.96446208803653
9534.85297880128706-1.85297880128706
9674.786967142138552.21303285786145
9735.29676883354378-2.29676883354378
9864.778082169073321.22191783092668
9944.60287726723866-0.602877267238663
10045.56751407579659-1.56751407579658
10165.369038967693440.630961032306563
10265.404598841476730.595401158523274
10366.22937236088053-0.229372360880531
10444.9895888306684-0.989588830668399
10576.770627639119470.229372360880531
10655.43352469507271-0.433524695072706
10775.571437153157051.42856284684295
10845.49346927291676-1.49346927291676
10964.93048923638331.06951076361671
11065.901447153128630.0985528468713707
11164.516170916697931.48382908330207
11254.322662751372320.677337248627681
11355.40656492575364-0.406564925753638
11465.511523852648790.488476147351206
11575.286260741585931.71373925841407
11644.67391219547654-0.673912195476545
11745.49452830778287-1.49452830778287
11885.513921883475742.48607811652426
11965.061635461751830.938364538248175
12034.86211208354529-1.86211208354529
12145.31758343674462-1.31758343674462
12255.18953177375749-0.189531773757492
12355.13830596036187-0.138305960361872
12465.142805067798560.857194932201442
12585.46987265876872.5301273412313
12624.69334357637887-2.69334357637887
12744.36374296224895-0.363742962248955
12875.500611421922041.49938857807796
12955.27057737323336-0.270577373233362
13065.423700585077180.576299414922816
13165.511507744762030.488492255237968
13245.4649674639417-1.4649674639417
13354.761210926829540.238789073170465
13465.20313457807340.796865421926596
13565.962221787931870.0377782120681267
13665.237337356538410.76266264346159
13765.159088400991190.840911599008806
13855.61238347793582-0.612383477935819
13954.646445813521820.353554186478179
14064.94435632167511.0556436783249
14145.34270715007612-1.34270715007612
14265.302841257972260.69715874202774
14335.63089966464894-2.63089966464894
14465.17776254167610.822237458323896
14585.436414671778822.56358532822118
14645.36425989916202-1.36425989916202


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.5794060302948930.8411879394102140.420593969705107
120.4235066372127980.8470132744255970.576493362787202
130.2813242383188350.562648476637670.718675761681165
140.1947141252438970.3894282504877950.805285874756103
150.1333692143918580.2667384287837160.866630785608142
160.3255404676941690.6510809353883370.674459532305831
170.2390142747339320.4780285494678640.760985725266068
180.248877996220280.497755992440560.75112200377972
190.2031709827558610.4063419655117210.79682901724414
200.1594489007120080.3188978014240160.840551099287992
210.1635525372220120.3271050744440250.836447462777988
220.3069313949770990.6138627899541990.6930686050229
230.2546007948480860.5092015896961730.745399205151914
240.4895823657273340.9791647314546670.510417634272666
250.420229411920080.8404588238401590.57977058807992
260.3570868770328240.7141737540656490.642913122967176
270.3334745655061210.6669491310122410.666525434493879
280.3482392820200110.6964785640400220.651760717979989
290.2869885070769110.5739770141538230.713011492923089
300.3520419844791220.7040839689582450.647958015520878
310.3030443593498930.6060887186997870.696955640650107
320.3203860148555990.6407720297111990.6796139851444
330.2882932112320510.5765864224641020.711706788767949
340.2591642704986070.5183285409972130.740835729501393
350.2170651027022450.4341302054044890.782934897297755
360.4703789801718350.940757960343670.529621019828165
370.438861776697130.877723553394260.56113822330287
380.3882275631722610.7764551263445230.611772436827739
390.4835710592543620.9671421185087230.516428940745638
400.5758729298749720.8482541402500550.424127070125028
410.5462018201985530.9075963596028940.453798179801447
420.6302396824112180.7395206351775640.369760317588782
430.7933806326382830.4132387347234330.206619367361717
440.852106448250240.2957871034995180.147893551749759
450.8216572746927730.3566854506144540.178342725307227
460.7957656531836640.4084686936326730.204234346816336
470.8100518969236720.3798962061526560.189948103076328
480.7750937891924180.4498124216151640.224906210807582
490.7465608995884650.5068782008230690.253439100411535
500.7099477022843380.5801045954313240.290052297715662
510.6727190444167780.6545619111664440.327280955583222
520.6329900180632120.7340199638735760.367009981936788
530.5836565117191990.8326869765616020.416343488280801
540.5489493810223140.9021012379553720.451050618977686
550.5230063483122410.9539873033755190.476993651687759
560.4793494098551910.9586988197103810.520650590144809
570.5537188852921680.8925622294156640.446281114707832
580.554842356946020.890315286107960.44515764305398
590.5130155515378080.9739688969243850.486984448462193
600.5231247571556170.9537504856887670.476875242844383
610.4942043943798520.9884087887597040.505795605620148
620.4500097265281150.900019453056230.549990273471885
630.4103756086534910.8207512173069820.589624391346509
640.3685081852575970.7370163705151940.631491814742403
650.3568720953791670.7137441907583340.643127904620833
660.3661444544742860.7322889089485720.633855545525714
670.3556346792283130.7112693584566270.644365320771687
680.3408181870014080.6816363740028170.659181812998592
690.4058010622900790.8116021245801580.594198937709921
700.3938132517946030.7876265035892060.606186748205397
710.3906365861972680.7812731723945370.609363413802732
720.4046419192454410.8092838384908830.595358080754559
730.3762380804063180.7524761608126350.623761919593682
740.3326236563392480.6652473126784970.667376343660752
750.2897059362316440.5794118724632870.710294063768356
760.3390972431723470.6781944863446950.660902756827653
770.2948118105486750.5896236210973510.705188189451325
780.2575202133966460.5150404267932920.742479786603354
790.3071504285842830.6143008571685660.692849571415717
800.308269995969250.61653999193850.69173000403075
810.2793483793384560.5586967586769120.720651620661544
820.2754926180213110.5509852360426230.724507381978689
830.2463340132384210.4926680264768410.75366598676158
840.2242481210237970.4484962420475940.775751878976203
850.4501622512772010.9003245025544020.549837748722799
860.5379834865667250.924033026866550.462016513433275
870.4877668063037130.9755336126074250.512233193696287
880.4452746401775030.8905492803550070.554725359822497
890.3983053244938310.7966106489876620.601694675506169
900.3763283950712610.7526567901425220.623671604928739
910.4083358800925890.8166717601851780.591664119907411
920.6147106633842640.7705786732314730.385289336615736
930.5957540551843430.8084918896313150.404245944815657
940.5721510861894370.8556978276211270.427848913810563
950.585622631260710.828754737478580.41437736873929
960.6825663270725510.6348673458548980.317433672927449
970.7522658074798750.4954683850402490.247734192520124
980.7317486467298180.5365027065403650.268251353270182
990.695348242456690.609303515086620.30465175754331
1000.7031573372240890.5936853255518220.296842662775911
1010.6603482618767030.6793034762465940.339651738123297
1020.6183902861862480.7632194276275040.381609713813752
1030.5783738290021410.8432523419957180.421626170997859
1040.586296864093440.827406271813120.41370313590656
1050.5298526429303830.9402947141392340.470147357069617
1060.4861788583181130.9723577166362260.513821141681887
1070.5040163117669440.9919673764661120.495983688233056
1080.5409349834109750.918130033178050.459065016589025
1090.5104317352060070.9791365295879850.489568264793993
1100.4513586557563010.9027173115126020.548641344243699
1110.4750363952372480.9500727904744960.524963604762752
1120.4386599697890920.8773199395781850.561340030210908
1130.4100937866171310.8201875732342630.589906213382869
1140.3608721612471050.7217443224942110.639127838752894
1150.3422209145400490.6844418290800990.657779085459951
1160.2929763624350160.5859527248700330.707023637564984
1170.3719744539162660.7439489078325320.628025546083734
1180.4701718555330860.9403437110661710.529828144466914
1190.5298163588208590.9403672823582820.470183641179141
1200.5394092097248290.9211815805503430.460590790275171
1210.6407892805159440.7184214389681110.359210719484056
1220.5731241807970750.853751638405850.426875819202925
1230.5475417767145140.9049164465709720.452458223285486
1240.4747651295798650.9495302591597310.525234870420135
1250.5392930972195620.9214138055608770.460706902780438
1260.7429756276834270.5140487446331470.257024372316573
1270.7859890843959470.4280218312081070.214010915604053
1280.7589604384243130.4820791231513750.241039561575687
1290.6720781582596810.6558436834806380.327921841740319
1300.619328850110380.761342299779240.38067114988962
1310.5195960027609210.9608079944781580.480403997239079
1320.9168024840293580.1663950319412850.0831975159706423
1330.8438355789601070.3123288420797860.156164421039893
1340.7287985526898140.5424028946203720.271201447310186
1350.7822872334246780.4354255331506450.217712766575322


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/14/t1292331660w0w02thaiwqhhpa/10gd1e1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/10gd1e1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/1ru4k1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/1ru4k1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/2ru4k1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/2ru4k1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/3ru4k1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/3ru4k1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/4k33n1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/4k33n1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/5k33n1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/5k33n1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/6k33n1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/6k33n1292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/7cck81292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/7cck81292331732.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/8n3jt1292331732.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292331660w0w02thaiwqhhpa/8n3jt1292331732.ps (open in new window)


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