Home » date » 2010 » Dec » 21 »

*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, 21 Dec 2010 18:27:37 +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/21/t1292956062rcjbfn2q6afp8r3.htm/, Retrieved Tue, 21 Dec 2010 19:27:53 +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/21/t1292956062rcjbfn2q6afp8r3.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 «
1 15 10 77 5 4 15 11 12 13 6 0 12 20 63 6 4 9 12 7 11 4 0 15 16 73 4 10 12 12 13 14 6 0 12 10 76 6 6 15 11 11 12 5 0 14 8 90 3 5 17 11 16 12 5 0 8 14 67 10 8 14 10 10 6 4 1 11 19 69 8 9 9 11 15 10 5 1 15 15 70 3 6 12 9 5 11 3 0 4 23 54 4 8 11 10 4 10 2 0 13 9 54 3 11 13 12 7 12 5 1 19 12 76 5 6 16 12 15 15 6 1 10 14 75 5 8 16 12 5 13 6 1 15 13 76 6 11 15 13 16 18 8 0 6 11 80 5 5 10 9 15 11 6 1 7 11 89 3 10 16 12 13 12 3 0 14 10 73 4 7 12 12 13 13 6 0 16 12 74 8 7 15 12 15 14 6 1 16 18 78 8 13 13 12 15 16 7 1 14 12 76 8 10 18 13 10 16 8 0 15 10 69 5 8 13 11 17 16 6 1 14 15 74 8 6 17 12 14 15 7 1 12 15 82 2 8 14 12 9 13 4 0 9 12 77 0 7 13 15 6 8 4 1 12 9 84 5 5 13 11 11 14 2 1 14 11 75 2 9 15 12 13 15 6 1 12 15 54 7 9 13 10 12 13 6 1 14 16 79 5 11 15 11 10 16 6 1 10 17 79 2 11 13 13 4 13 6 1 14 12 69 12 11 14 6 13 12 6 1 16 11 88 7 9 13 12 15 15 7 1 10 13 57 0 7 16 12 8 11 4 1 8 9 69 2 6 14 10 10 14 3 1 12 11 86 3 6 18 12 8 13 5 1 11 9 65 0 6 15 12 7 13 6 0 8 20 66 9 5 9 11 9 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 time14 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
WeightedPopularity[t] = + 0.972956430682553 -0.720578550873085Gender[t] + 0.193977224888875Popularity[t] + 0.129569064646986Depression[t] + 0.0385516722914935Belonging[t] -0.0995732349156117ParentalCriticism[t] -0.181108909165785Happiness[t] -0.0293697936894506FindingFriends[t] + 0.223465400630920KnowingPeople[t] -0.124692442058178Liked[t] + 0.0928162102631865Celebrity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.9729564306825533.6272350.26820.7888990.394449
Gender-0.7205785508730850.511864-1.40780.1613440.080672
Popularity0.1939772248888750.1183071.63960.1032550.051628
Depression0.1295690646469860.0921451.40610.1618230.080912
Belonging0.03855167229149350.0244291.57810.1167240.058362
ParentalCriticism-0.09957323491561170.092511-1.07630.2835610.14178
Happiness-0.1811089091657850.123565-1.46570.1448960.072448
FindingFriends-0.02936979368945060.134956-0.21760.8280280.414014
KnowingPeople0.2234654006309200.093232.39690.0178070.008903
Liked-0.1246924420581780.138526-0.90010.369540.18477
Celebrity0.09281621026318650.2322950.39960.6900670.345034


Multiple Linear Regression - Regression Statistics
Multiple R0.446942917764097
R-squared0.199757971739485
Adjusted R-squared0.144568866342208
F-TEST (value)3.61951820565913
F-TEST (DF numerator)10
F-TEST (DF denominator)145
p-value0.000253968822219841
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.87910786879275
Sum Squared Residuals1201.94300742093


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
155.60569168071815-0.60569168071815
266.50401491305417-0.504014913054166
346.96476841319411-2.96476841319411
465.315051245965930.684948754034067
536.83827339826926-3.83827339826926
6105.15365882885394.8463411711461
787.227935582874290.772064417125709
834.79327359186798-1.79327359186798
943.560831906284610.439168093715387
1033.47244286333534-0.472442863335341
1156.61357318236603-1.61357318236603
1252.903949023344572.09605097665543
1365.656126783338550.343873216661451
1456.61019127341412-1.61019127341412
1533.90785411330265-0.907854113302652
1646.41678894722834-2.41678894722834
1786.881344830297861.11865516970214
1886.700597091457391.29940290854261
1983.797419481551794.20258051844821
2056.72503140890843-1.72503140890843
2185.643532807746112.35646719225389
2224.76178124413864-2.76178124413864
2304.46460133635785-4.46460133635785
2454.707274547119070.292725452880929
2524.91102472414029-2.91102472414029
2674.678638304025022.32136169597498
2754.748211416448480.251788583551520
2823.43863473488165-1.43863473488165
29125.341542282684116.65845771731589
3076.702115743564050.29788425643595
3102.91417175784906-2.91417175784906
3222.97112902243149-0.971129022431488
3333.74177331751702-0.74177331751702
3402.89175038234243-2.89175038234243
3596.095795948350642.90420405164936
3624.9923582272319-2.99235822723190
3732.805449328612530.194550671387470
3813.76047815793811-2.76047815793811
39107.82254894244392.17745105755609
4015.65426925740579-4.65426925740579
4144.7123042702586-0.712304270258599
4265.720873181704630.279126818295373
4363.60449502852772.3955049714723
4445.72735431099095-1.72735431099095
4544.95981358235764-0.959813582357637
4677.20276610299967-0.202766102999666
4775.687477405027591.31252259497241
4876.354304914663740.645695085336258
4905.18346853403717-5.18346853403717
5033.72826519530633-0.728265195306329
5184.841468779769963.15853122023004
5286.326817617922971.67318238207703
53104.736206330663685.26379366933632
54116.505640906406924.49435909359308
5565.144032115352270.855967884647727
5624.59824736528953-2.59824736528953
5764.183449054484881.81655094551512
5812.50884492740707-1.50884492740707
5954.488633551823680.511366448176319
6045.23293283176608-1.23293283176608
6166.63841519108404-0.638415191084038
6268.09990505255761-2.09990505255761
6344.07585357749919-0.0758535774991856
6415.76391419661453-4.76391419661453
6562.871007816636473.12899218336353
6676.836252273908680.163747726091319
6777.35602215914786-0.356022159147858
6822.43169035853933-0.431690358539328
6977.25178570672601-0.251785706726013
7084.875920038403713.12407996159629
7154.171601626079180.828398373920822
7245.45789159535606-1.45789159535606
7326.5542380518797-4.5542380518797
7405.05339966072483-5.05339966072483
7574.720834677751462.27916532224854
7606.5561028322966-6.5561028322966
7754.596820022923740.403179977076260
7833.44709242924457-0.447092429244573
7932.332396439746950.667603560253050
8032.507894922986600.492105077013402
8136.71118567073936-3.71118567073936
8276.411358740174910.588641259825093
8364.183963019203061.81603698079694
8433.58905842484495-0.589058424844949
8504.00396157842198-4.00396157842198
8622.35380198307419-0.35380198307419
8705.15401141369296-5.15401141369296
8895.627893099890823.37210690010918
89106.713505895991283.28649410400872
9035.63975618049751-2.63975618049751
9174.99674445724672.00325554275330
9234.08972412695808-1.08972412695808
9364.705986919572321.29401308042768
9453.411256758039491.58874324196051
9505.81838696908335-5.81838696908335
9603.20547359304074-3.20547359304074
9744.53242427847292-0.532424278472920
9803.78588577684123-3.78588577684123
9906.18935552005173-6.18935552005173
10076.672500505569680.32749949443032
10134.10953106859248-1.10953106859248
10295.673523738103193.32647626189681
10345.11404696764155-1.11404696764155
10445.80599429078765-1.80599429078765
105157.131387741277537.86861225872247
10674.72382093303382.27617906696620
10783.292362812713844.70763718728616
10823.99260333741476-1.99260333741476
10984.923124953863323.07687504613668
11075.894515142057131.10548485794287
11136.42868385522656-3.42868385522656
11233.21194678083465-0.211946780834653
11366.10001901285009-0.100019012850093
11486.380286548457441.61971345154255
11554.870189486182280.129810513817721
11665.478475101072360.521524898927636
117106.440309443244123.55969055675588
11805.18691357904874-5.18691357904874
11953.564801852988141.43519814701186
12003.46814869255672-3.46814869255672
12101.58937724809078-1.58937724809078
12256.86703652146192-1.86703652146192
123107.181114773620522.81888522637948
12403.38905146920374-3.38905146920374
12553.181865685621941.81813431437806
12665.92044473795780.079555262042203
12714.24289648778702-3.24289648778702
12854.971040086092450.0289599139075477
12933.4180994435836-0.418099443583603
13035.06092007228957-2.06092007228957
13164.017500462533111.98249953746689
13224.00933740177566-2.00933740177566
13355.50491603601132-0.504916036011322
13463.934862711465582.06513728853442
13520.9763387408083021.02366125919170
13635.99919851835793-2.99919851835793
13776.132564973317560.86743502668244
13865.677195865711140.322804134288856
13931.685470727583731.31452927241627
14066.11961119552671-0.11961119552671
14193.999311464543705.0006885354563
14225.72722004402486-3.72722004402486
14355.29882986863366-0.298829868633656
144105.726199156707474.27380084329253
14594.828565439247744.17143456075226
14685.97471056258612.02528943741390
14785.569193864474292.43080613552571
14855.76005507058476-0.76005507058476
14996.809530587161442.19046941283856
15095.390966556147333.60903344385267
151146.48882507122997.5111749287701
15255.47679018683418-0.476790186834178
153124.581475037757137.41852496224287
15463.582834328871992.41716567112801
15564.357311327490771.64268867250923
15685.220083345826872.77991665417313


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
140.2052039721483040.4104079442966080.794796027851696
150.1111605070709830.2223210141419650.888839492929017
160.04961783986520250.0992356797304050.950382160134797
170.06812902622860850.1362580524572170.931870973771391
180.04749725499186050.0949945099837210.95250274500814
190.02677604178528380.05355208357056750.973223958214716
200.01777243062684900.03554486125369790.98222756937315
210.00912151029607040.01824302059214080.99087848970393
220.004965915440004130.009931830880008260.995034084559996
230.006250235014760830.01250047002952170.993749764985239
240.068282830196770.136565660393540.93171716980323
250.09237205738240350.1847441147648070.907627942617596
260.06957692849256740.1391538569851350.930423071507433
270.04560374656035080.09120749312070170.95439625343965
280.03035920069878080.06071840139756160.96964079930122
290.03431302800206280.06862605600412560.965686971997937
300.03058942552971570.06117885105943140.969410574470284
310.05934689792165230.1186937958433050.940653102078348
320.0408859539198390.0817719078396780.959114046080161
330.02782225575087190.05564451150174370.972177744249128
340.02640158105522800.05280316211045610.973598418944772
350.04081796765990310.08163593531980610.959182032340097
360.05724396475588790.1144879295117760.942756035244112
370.04058475121252330.08116950242504660.959415248787477
380.0313728681386050.062745736277210.968627131861395
390.04526330013860750.0905266002772150.954736699861392
400.08342872107504480.1668574421500900.916571278924955
410.06243638858051470.1248727771610290.937563611419485
420.04863314172366510.09726628344733010.951366858276335
430.07330195841663590.1466039168332720.926698041583364
440.06154645125800270.1230929025160050.938453548741997
450.05551100020378230.1110220004075650.944488999796218
460.04158563812546060.08317127625092130.95841436187454
470.04030246516524650.0806049303304930.959697534834753
480.03171202798108460.06342405596216930.968287972018915
490.06848820273432390.1369764054686480.931511797265676
500.05240557451051890.1048111490210380.947594425489481
510.06626467795034170.1325293559006830.933735322049658
520.05776771925700650.1155354385140130.942232280742993
530.08460813743440710.1692162748688140.915391862565593
540.1066725583218720.2133451166437440.893327441678128
550.08580341006774980.1716068201355000.91419658993225
560.1017290244478350.203458048895670.898270975552165
570.08518042796512360.1703608559302470.914819572034876
580.08676884728041750.1735376945608350.913231152719582
590.07183938826616690.1436787765323340.928160611733833
600.06514679793163920.1302935958632780.934853202068361
610.05145196624755950.1029039324951190.94854803375244
620.04600650758491680.09201301516983370.953993492415083
630.03487514806194830.06975029612389660.965124851938052
640.04455921288052070.08911842576104150.95544078711948
650.04966134795581180.09932269591162360.950338652044188
660.0379311289709850.075862257941970.962068871029015
670.02872122433857860.05744244867715720.971278775661421
680.02158940987940650.0431788197588130.978410590120594
690.01823333365445540.03646666730891080.981766666345545
700.02253605270535030.04507210541070070.97746394729465
710.01752584084158840.03505168168317670.982474159158412
720.01569575656549940.03139151313099870.9843042434345
730.03698584392319280.07397168784638550.963014156076807
740.0553832258470390.1107664516940780.94461677415296
750.05070592244309590.1014118448861920.949294077556904
760.1550358002895620.3100716005791250.844964199710438
770.1288537861131680.2577075722263370.871146213886832
780.1065606998034790.2131213996069590.89343930019652
790.08768719294293090.1753743858858620.91231280705707
800.07336125277928180.1467225055585640.926638747220718
810.08167482295816790.1633496459163360.918325177041832
820.06612349303699510.1322469860739900.933876506963005
830.05836637757205210.1167327551441040.941633622427948
840.04580016571988210.09160033143976420.954199834280118
850.05875494837180550.1175098967436110.941245051628194
860.04925026306680990.09850052613361970.95074973693319
870.09837779701545170.1967555940309030.901622202984548
880.1076393137585330.2152786275170660.892360686241467
890.1166471701776830.2332943403553660.883352829822317
900.1192792659925290.2385585319850570.880720734007471
910.1115966674728660.2231933349457320.888403332527134
920.0926622371819290.1853244743638580.907337762818071
930.078538365112320.157076730224640.92146163488768
940.06975860000608270.1395172000121650.930241399993917
950.1608124575904950.321624915180990.839187542409505
960.1682368229839000.3364736459678000.8317631770161
970.1502328502646110.3004657005292220.84976714973539
980.1885101453894390.3770202907788780.811489854610561
990.3426512300652930.6853024601305860.657348769934707
1000.2985237877334090.5970475754668180.701476212266591
1010.2631591240022070.5263182480044140.736840875997793
1020.2645806467333990.5291612934667990.7354193532666
1030.2274401608807410.4548803217614820.772559839119259
1040.2358427339359810.4716854678719630.764157266064019
1050.4956997480720970.9913994961441940.504300251927903
1060.4737691279690480.9475382559380960.526230872030952
1070.5660927394143620.8678145211712770.433907260585638
1080.5519251293067750.896149741386450.448074870693225
1090.5409240398430990.9181519203138010.459075960156900
1100.5077092906455210.9845814187089580.492290709354479
1110.5550764571468060.8898470857063870.444923542853194
1120.4989027574066350.997805514813270.501097242593365
1130.4417736681878620.8835473363757250.558226331812138
1140.3939995500256880.7879991000513760.606000449974312
1150.345918234693770.691836469387540.65408176530623
1160.2950871175474080.5901742350948170.704912882452592
1170.2736051399120320.5472102798240630.726394860087968
1180.444219280495990.888438560991980.55578071950401
1190.3880823502500290.7761647005000570.611917649749971
1200.6054025919252880.7891948161494240.394597408074712
1210.6209942698789950.7580114602420090.379005730121005
1220.5665006596875230.8669986806249540.433499340312477
1230.5569810691483640.8860378617032720.443018930851636
1240.6117752377193860.7764495245612290.388224762280614
1250.5642262895369750.871547420926050.435773710463025
1260.4948090129556870.9896180259113740.505190987044313
1270.4718330846683950.943666169336790.528166915331605
1280.4032365010611410.8064730021222830.596763498938859
1290.4174605318994710.8349210637989410.58253946810053
1300.4813452221727740.9626904443455480.518654777827226
1310.4095921676972230.8191843353944450.590407832302777
1320.4249825369505460.8499650739010920.575017463049454
1330.3647866265138010.7295732530276010.635213373486199
1340.2935824413663930.5871648827327870.706417558633607
1350.2278759560844020.4557519121688030.772124043915599
1360.1817691753839610.3635383507679220.818230824616039
1370.2001978062178220.4003956124356430.799802193782178
1380.1470854021063480.2941708042126970.852914597893652
1390.1515383387201740.3030766774403470.848461661279826
1400.09628105517244540.1925621103448910.903718944827555
1410.6869354848751720.6261290302496560.313064515124828
1420.5566983660691080.8866032678617830.443301633930892


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00775193798449612OK
5% type I error level90.0697674418604651NOK
10% type I error level360.279069767441860NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/10bn0y1292956042.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/10bn0y1292956042.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/1bu1r1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/1bu1r1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/2bu1r1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/2bu1r1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/3bu1r1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/3bu1r1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/44l0c1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/44l0c1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/54l0c1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/54l0c1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/64l0c1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/64l0c1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/7xvhx1292956041.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/7xvhx1292956041.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/8iejv1292956042.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/8iejv1292956042.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/9iejv1292956042.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292956062rcjbfn2q6afp8r3/9iejv1292956042.ps (open in new window)


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