Home » date » 2010 » Dec » 14 »

Multiple Linear Regression - Celebrity

*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 15:37:51 +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/t1292341008m2qonps61b6dplf.htm/, Retrieved Tue, 14 Dec 2010 16:36:48 +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/t1292341008m2qonps61b6dplf.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 66 4 1 1 54 5 1 1 82 4 1 1 61 4 1 1 65 6 1 1 77 6 1 1 66 4 2 1 66 4 1 1 66 6 1 1 48 4 1 1 57 6 1 1 80 5 1 1 60 4 1 1 70 6 2 1 85 3 2 1 59 5 1 1 72 6 1 1 70 4 2 1 74 6 2 1 70 2 1 1 51 7 2 1 70 5 1 1 71 2 2 1 72 4 1 1 50 4 2 1 69 6 2 1 73 6 1 1 66 5 2 1 73 6 1 1 58 6 2 1 78 4 1 1 83 6 2 1 76 6 1 1 77 6 1 1 79 2 2 1 71 4 2 1 79 5 1 1 60 3 1 1 73 7 2 1 70 5 1 1 42 3 1 1 74 8 1 1 68 8 1 1 83 5 2 1 62 6 2 1 79 3 2 1 61 5 2 1 86 4 2 1 64 5 1 1 75 5 2 1 59 6 2 1 82 5 1 1 61 6 1 1 69 6 1 1 60 4 2 1 59 8 1 1 81 6 2 1 65 4 2 1 60 6 2 1 60 5 2 1 45 5 1 1 75 6 2 1 84 6 1 1 77 6 2 1 64 6 2 1 54 6 2 1 72 6 1 1 56 7 2 1 67 4 2 1 81 4 1 1 73 3 2 1 67 6 2 1 72 5 1 1 69 5 1 1 71 3 2 1 77 5 1 1 63 4 2 1 49 3 2 1 74 7 1 1 76 4 2 1 65 4 1 1 65 5 2 1 69 6 1 1 71 2 1 1 68 2 2 1 49 6 1 1 86 4 2 1 63 5 2 1 77 6 1 1 52 7 1 1 73 8 1 1 63 6 1 1 54 6 1 1 56 3 1 1 54 7 1 1 61 3 1 1 70 6 2 1 68 4 2 1 63 4 1 1 76 6 1 1 69 6 1 1 71 6 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Celebrity[t] = + 1.74574549142842 -0.425106954614593Geslacht[t] + 1.74847731530155Leeftijd[t] + 0.0326680938365645Groepsgevoel[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.745745491428421.4366491.21520.2263250.113163
Geslacht-0.4251069546145930.231544-1.8360.0684550.034227
Leeftijd1.748477315301550.9842921.77640.0778120.038906
Groepsgevoel0.03266809383656450.0117692.77590.0062470.003124


Multiple Linear Regression - Regression Statistics
Multiple R0.283951170942918
R-squared0.080628267479854
Adjusted R-squared0.0612049210181609
F-TEST (value)4.15110071989239
F-TEST (DF numerator)3
F-TEST (DF denominator)142
p-value0.00745610775654038
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.35117042995307
Sum Squared Residuals259.243937370698


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
164.800103090714041.19989690928596
244.83319291928986-0.83319291928986
355.74789954671366-0.747899546713665
445.06186957614581-1.06186957614581
545.19254195149207-1.19254195149207
665.584559077530840.415440922469157
765.225210045328630.774789954671366
844.80010309071404-0.80010309071404
945.22521004532863-1.22521004532863
1064.637184356270471.36281564372953
1144.93119720079955-0.931197200799553
1265.682563359040540.317436640959464
1355.02920148230925-0.0292014823092468
1445.35588242067489-1.35588242067489
1565.420796873608770.579203126391235
1634.57142643385809-1.57142643385809
1755.42121860834802-0.42121860834802
1865.355882420674890.644117579325108
1945.06144784140656-1.06144784140656
2064.93077546606031.06922453393970
2124.73518863778017-2.73518863778017
2274.93077546606032.0692245339397
2355.38855051451146-0.388550514511456
2424.99611165373343-2.99611165373343
2544.7025205439436-0.702520543943602
2644.89810737222373-0.898107372223733
2765.028779747569990.971220252430009
2865.225210045328630.774789954671366
2955.02877974756999-0.0287797475699915
3064.963865294636121.03613470536388
3165.192120216752810.807879783247186
3245.78056764055023-1.78056764055023
3365.126784029079690.873215970920315
3465.584559077530840.415440922469157
3565.649895265203970.350104734796028
3624.96344355989686-2.96344355989686
3745.22478831058938-1.22478831058938
3855.02920148230925-0.0292014823092468
3935.45388670218458-2.45388670218458
4074.93077546606032.0692245339397
4154.441175793251090.558824206748914
4235.48655479602115-2.48655479602115
4385.290546233001762.70945376699824
4485.780567640550232.21943235944977
4554.669430715367780.330569284632218
4665.224788310589380.775211689410622
4734.63676262153122-1.63676262153122
4855.45346496744533-0.453464967445329
4944.73476690304091-0.734766903040911
5055.51922288985771-0.519222889857714
5154.571426433858090.428573566141911
5265.322792592099070.677207407900928
5355.06186957614581-0.0618695761458112
5465.323214326838330.676785673161673
5565.029201482309250.970798517690753
5644.57142643385809-0.571426433858089
5785.71523145287712.2847685471229
5864.767434996877481.23256500312252
5944.60409452769465-0.604094527694654
6064.604094527694651.39590547230535
6154.114073120146190.885926879853813
6255.51922288985771-0.519222889857714
6365.38812877977220.6118712202278
6465.584559077530840.415440922469157
6564.734766903040911.26523309695909
6664.408085964675271.59191403532473
6764.996111653733431.00388834626657
6864.898529106962991.10147089303701
6974.832771184550612.16722881544940
7045.29012449826251-1.29012449826251
7145.45388670218458-1.45388670218458
7234.8327711845506-1.83277118455060
7364.996111653733431.00388834626657
7455.32321432683833-0.323214326838327
7555.38855051451146-0.388550514511456
7635.15945212291625-2.15945212291625
7755.12720576381894-0.127205763818940
7844.24474549549244-0.244745495492444
7935.06144784140656-2.06144784140656
8075.551890983694281.44810901630572
8144.76743499687748-0.767434996877476
8245.19254195149207-1.19254195149207
8354.898107372223730.101892627776266
8465.388550514511460.611449485488544
8525.29054623300176-3.29054623300176
8624.24474549549244-2.24474549549244
8765.878571922059920.121428077940077
8844.70209880920435-0.702098809204347
8955.15945212291625-0.159452122916249
9064.767856731616731.23214326838327
9175.453886702184581.54611329781542
9285.127205763818942.87279423618106
9364.833192919289861.16680708071014
9464.898529106962991.10147089303701
9534.83319291928986-1.83319291928986
9675.061869576145811.93813042385419
9735.35588242067489-2.35588242067489
9864.865439278387171.13456072161283
9944.70209880920435-0.702098809204347
10045.55189098369428-1.55189098369428
10165.323214326838330.676785673161673
10265.388550514511460.611449485488544
10366.09164882704294-0.0916488270429445
10444.83319291928986-0.83319291928986
10576.908351172957060.0916488270429442
10655.35588242067489-0.355882420674891
10775.551890983694281.44810901630572
10845.38855051451146-1.38855051451146
10965.028779747569990.971220252430009
11065.71523145287710.284768547122899
11164.70252054394361.29747945605640
11254.441175793251090.558824206748914
11355.22521004532863-0.225210045328634
11465.584559077530840.415440922469157
11575.094537669982381.90546233001762
11644.80010309071404-0.80010309071404
11745.32321432683833-1.32321432683833
11885.421218608348022.57878139165198
11965.25787813916520.742121860834802
12034.99653338847268-1.99653338847268
12145.22521004532863-1.22521004532863
12255.29054623300176-0.290546233001762
12354.996111653733430.00388834626657304
12465.028779747569990.971220252430009
12585.323214326838332.67678567316167
12624.93119720079955-2.93119720079955
12744.44075405851183-0.440754058511831
12875.421218608348021.57878139165198
12955.29054623300176-0.290546233001762
13065.355460685935640.644539314064364
13165.486554796021150.513445203978851
13245.42121860834802-1.42121860834802
13354.800103090714040.199896909285960
13465.061869576145810.938130423854189
13565.878571922059920.121428077940077
13665.290124498262510.709875501737493
13765.224788310589380.775211689410622
13855.45388670218458-0.453886702184585
13954.571426433858090.428573566141911
14065.15987385765550.840126142344495
14145.51922288985771-1.51922288985771
14265.290546233001760.709453766998237
14335.81323573438679-2.81323573438679
14465.290546233001760.709453766998237
14585.290546233001762.70945376699824
14645.32321432683833-1.32321432683833


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.3505418198590760.7010836397181520.649458180140924
80.3897621741662250.779524348332450.610237825833775
90.2925587596956610.5851175193913210.70744124030434
100.4080757257633120.8161514515266230.591924274236688
110.3275172566334020.6550345132668040.672482743366598
120.2650883079468240.5301766158936490.734911692053176
130.1854587147396030.3709174294792050.814541285260397
140.1642202947905430.3284405895810860.835779705209457
150.1148421667014180.2296843334028350.885157833298582
160.154964277684520.309928555369040.84503572231548
170.1068151167328090.2136302334656170.893184883267191
180.09124004651562630.1824800930312530.908759953484374
190.07560174958521260.1512034991704250.924398250414787
200.07889752244681170.1577950448936230.921102477553188
210.1597650779028000.3195301558056010.8402349220972
220.2397123180707350.479424636141470.760287681929265
230.1864532970278530.3729065940557070.813546702972146
240.4557937061130020.9115874122260050.544206293886998
250.3925779797822380.7851559595644760.607422020217762
260.34549464478430.69098928956860.6545053552157
270.325866635213960.651733270427920.67413336478604
280.3094301472568690.6188602945137370.690569852743132
290.2545181228032080.5090362456064170.745481877196792
300.2671258225055820.5342516450111650.732874177494418
310.2339460175569380.4678920351138750.766053982443062
320.2678653933137950.5357307866275890.732134606686205
330.2393756996380360.4787513992760720.760624300361964
340.2041678084853750.408335616970750.795832191514625
350.1692275398860360.3384550797720710.830772460113964
360.3431279410299920.6862558820599840.656872058970008
370.3284077679338430.6568155358676870.671592232066156
380.2815421920226470.5630843840452950.718457807977353
390.3763056603230620.7526113206461250.623694339676938
400.4680521114326570.9361042228653140.531947888567343
410.4371298301935320.8742596603870630.562870169806468
420.5289260905988220.9421478188023570.471073909401178
430.7128036974778170.5743926050443660.287196302522183
440.7916604799554110.4166790400891780.208339520044589
450.7560222337724620.4879555324550760.243977766227538
460.7274012621669060.5451974756661880.272598737833094
470.7376826519524260.5246346960951490.262317348047574
480.6987597595499870.6024804809000250.301240240450013
490.6625896846911120.6748206306177750.337410315308888
500.6199933599398960.7600132801202080.380006640060104
510.5796886562504240.8406226874991510.420311343749576
520.5422994575171460.9154010849657070.457700542482853
530.4932451842080770.9864903684161540.506754815791923
540.4595602813662760.9191205627325510.540439718633724
550.441968258418330.883936516836660.55803174158167
560.3995540903599150.799108180719830.600445909640085
570.4863043974595840.9726087949191670.513695602540416
580.4825271613384530.9650543226769050.517472838661547
590.4411621319441000.8823242638881990.5588378680559
600.4489554410774890.8979108821549780.551044558922511
610.4251391311015470.8502782622030950.574860868898453
620.383699185570450.76739837114090.61630081442955
630.3464524092494500.6929048184989010.65354759075055
640.3067723242522730.6135446485045450.693227675747727
650.3010545357365900.6021090714731790.69894546426341
660.3168280498330430.6336560996660850.683171950166957
670.2973693042891120.5947386085782240.702630695710888
680.2842718375535130.5685436751070260.715728162446487
690.3515006967698020.7030013935396040.648499303230198
700.3461647856482870.6923295712965730.653835214351713
710.3505879418842480.7011758837684960.649412058115752
720.3850605218157860.7701210436315720.614939478184214
730.3659007058230370.7318014116460750.634099294176963
740.3237358653590840.6474717307181690.676264134640916
750.284738256278310.569476512556620.71526174372169
760.3450463787358610.6900927574717220.654953621264139
770.3020346999776970.6040693999553930.697965300022303
780.2626503776247990.5253007552495970.737349622375201
790.3133517608735420.6267035217470840.686648239126458
800.3181272220936410.6362544441872830.681872777906358
810.2891019108514240.5782038217028470.710898089148576
820.2787796232603030.5575592465206060.721220376739697
830.2395130299190450.479026059838090.760486970080955
840.2102036738562540.4204073477125080.789796326143746
850.4115828757925030.8231657515850060.588417124207497
860.5020685713986650.995862857202670.497931428601335
870.4534732868863770.9069465737727540.546526713113623
880.4241445598040100.8482891196080190.57585544019599
890.3789002004846230.7578004009692470.621099799515377
900.3667383680122120.7334767360244240.633261631987788
910.3779845689403720.7559691378807450.622015431059628
920.5406351607153880.9187296785692230.459364839284612
930.525551971999770.9488960560004610.474448028000231
940.508265356470920.983469287058160.49173464352908
950.5485715123260880.9028569753478240.451428487673912
960.5988152187173250.802369562565350.401184781282675
970.6952791790156020.6094416419687950.304720820984398
980.6724867537751170.6550264924497660.327513246224883
990.6456320396566880.7087359206866240.354367960343312
1000.6638561796680.6722876406640.336143820332
1010.6251570112305740.7496859775388510.374842988769426
1020.5828015440800830.8343969118398350.417198455919917
1030.529787958639360.940424082721280.47021204136064
1040.4976131698866680.9952263397733350.502386830113332
1050.4435791990950990.8871583981901980.556420800904901
1060.3947168597866080.7894337195732150.605283140213392
1070.3977858747102150.795571749420430.602214125289785
1080.4010406517864980.8020813035729960.598959348213502
1090.3642261321262390.7284522642524780.635773867873761
1100.3142538867881420.6285077735762840.685746113211858
1110.3032457978374160.6064915956748330.696754202162584
1120.2653719991353850.5307439982707710.734628000864615
1130.2208891497608430.4417782995216850.779110850239157
1140.1821018389396370.3642036778792750.817898161060363
1150.2231179829260420.4462359658520830.776882017073958
1160.2010157482508320.4020314965016650.798984251749168
1170.1933876758593680.3867753517187360.806612324140632
1180.3113236021714000.6226472043427990.6886763978286
1190.2783258024757930.5566516049515850.721674197524207
1200.3178187584397300.6356375168794610.68218124156027
1210.3010387147611540.6020774295223080.698961285238846
1220.2474546636270550.4949093272541110.752545336372945
1230.2003996969360400.4007993938720790.79960030306396
1240.1640293430214590.3280586860429180.835970656978541
1250.3059523380496940.6119046760993870.694047661950306
1260.5857025184503050.828594963099390.414297481549695
1270.6092196453007780.7815607093984430.390780354699222
1280.6490829855086720.7018340289826550.350917014491327
1290.5753836505893220.8492326988213570.424616349410678
1300.5140299954081920.9719400091836150.485970004591808
1310.4514797079715720.9029594159431450.548520292028428
1320.4453731393525970.8907462787051940.554626860647403
1330.3791435010376910.7582870020753810.62085649896231
1340.2920715593157510.5841431186315030.707928440684249
1350.2783351592112700.5566703184225410.72166484078873
1360.239327733748350.47865546749670.76067226625165
1370.4777237754486620.9554475508973240.522276224551338
1380.3399403622396680.6798807244793370.660059637760332
1390.2092269687662930.4184539375325860.790773031233707


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/12lz41292341060.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/12lz41292341060.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/22lz41292341060.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/22lz41292341060.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/32lz41292341060.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/32lz41292341060.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/754xs1292341060.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341008m2qonps61b6dplf/754xs1292341060.ps (open in new window)


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


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