Home » date » 2010 » Dec » 12 »

WS10 MR

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 12 Dec 2010 20:02:08 +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/12/t1292184077a9olm1hcyysls09.htm/, Retrieved Sun, 12 Dec 2010 21:01:17 +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/12/t1292184077a9olm1hcyysls09.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 73 62 66 4 58 54 54 5 68 41 82 4 62 49 61 4 65 49 65 6 81 72 77 6 73 78 66 4 64 58 66 4 68 58 66 6 51 23 48 4 68 39 57 6 61 63 80 5 69 46 60 4 73 58 70 6 61 39 85 3 62 44 59 5 63 49 72 6 69 57 70 4 47 76 74 6 66 63 70 2 58 18 51 7 63 40 70 5 69 59 71 2 59 62 72 4 59 70 50 4 63 65 69 6 65 56 73 6 65 45 66 5 71 57 73 6 60 50 58 6 81 40 78 4 67 58 83 6 66 49 76 6 62 49 77 6 63 27 79 2 73 51 71 4 55 75 79 5 59 65 60 3 64 47 73 7 63 49 70 5 64 65 42 3 73 61 74 8 54 46 68 8 76 69 83 5 74 55 62 6 63 78 79 3 73 58 61 5 67 34 86 4 68 67 64 5 66 45 75 5 62 68 59 6 71 49 82 5 63 19 61 6 75 72 69 6 77 59 60 4 62 46 59 8 74 56 81 6 67 45 65 4 56 53 60 6 60 67 60 5 58 73 45 5 65 46 75 6 49 70 84 6 61 38 77 6 66 54 64 6 64 46 54 6 65 46 72 6 46 45 56 7 65 47 67 4 81 25 81 4 72 63 73 3 65 46 67 6 74 69 72 5 59 43 69 5 69 49 71 3 58 39 77 5 71 65 63 4 79 54 49 3 68 50 74 7 66 42 76 4 62 45 65 4 69 50 65 5 63 55 69 6 62 38 71 2 61 40 68 2 65 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Celebrity[t] = + 3.04956856198265 + 0.00142148984412118TotNV[t] + 0.00448627811678545TotANX[t] + 0.0260840758692566TotGR[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.049568561982651.1838172.5760.0110150.005507
TotNV0.001421489844121180.0162590.08740.9304540.465227
TotANX0.004486278116785450.0091960.48790.6263920.313196
TotGR0.02608407586925660.012182.14150.0339430.016971


Multiple Linear Regression - Regression Statistics
Multiple R0.191480225727988
R-squared0.0366646768448413
Adjusted R-squared0.0163125221302958
F-TEST (value)1.80151327262843
F-TEST (DF numerator)3
F-TEST (DF denominator)142
p-value0.149630239154723
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.38309910883036
Sum Squared Residuals271.64076656832


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
165.153035571215130.846964428784874
244.78281408818795-0.782814088187947
355.46906149545013-0.469061495450133
444.9486571880653-0.948657188065301
545.05725796107469-1.05725796107469
665.496195105697770.503804894302226
765.224816021083690.775183978916305
845.12229705015089-1.12229705015090
945.12798300952738-1.12798300952738
1064.477284582443211.52271541755679
1144.80798704248515-0.807987042485147
1265.505641033372050.494358966627948
1354.919064706754540.080935293245464
1445.23942676222501-1.23942676222501
1565.528390737915480.471609262084516
1634.87405764574286-1.87405764574286
1755.23700351247124-0.237003512471245
1865.229254524731740.770745475268258
1945.38755733585703-1.38755733585703
2065.251907723900090.748092276099909
2124.5430558483759-2.5430558483759
2275.144458857681661.85554114231834
2355.26431115683457-0.264311156834570
2425.28963916861297-3.28963916861297
2544.75167972442361-0.751679724423609
2645.23053173473204-1.23053173473204
2765.297334514846240.702665485153758
2865.065396924476810.934603075523194
2955.31034973202775-0.310349732027754
3064.872048258886071.12795174111393
3165.37871828182990.621281718170103
3245.56999080946062-1.56999080946062
3365.345604285480630.654395714519365
3465.366002401973410.633997598026593
3565.320893924986760.679106075013239
3625.23410689127677-3.23410689127677
3745.52486335583949-1.52486335583949
3854.990089092532250.00991090746775223
3935.25553652195105-2.25553652195105
4075.184835360732731.81516463926727
4154.527683176106230.472316823893766
4235.35722190005239-2.35722190005239
4385.106414966046772.89358503395323
4485.632133277342352.36786672265765
4555.01871681076472-0.0187168107647241
4665.549694108942820.450305891057181
4735.0046700794017-2.00467007940170
4855.54057236226554-0.54057236226554
4945.11619136083994-1.11619136083994
5055.30157509714424-0.301575097144236
5154.981728320545710.018271679454289
5265.509216189916780.49078381008322
5354.815490334405860.184509665594142
5465.278993559678990.721006440321006
5564.988758241025721.01124175897428
5644.88303020197643-0.883030201976431
5785.518800530397392.48119946960261
5865.042155828295790.957844171704209
5944.93198928559846-0.931989285598459
6065.000483138609940.99951686139006
6154.633296689583560.366703310416439
6255.3046398854169-0.304639885416901
6365.624323405537120.375676594462878
6465.315231852844650.684768147155355
6565.055026765633480.944973234366517
6664.755452802318391.24454719768161
6765.226387657809130.77361234219087
6864.777547858745941.22245214125406
6975.100453556579631.89954644342037
7045.38967633768588-1.38967633768588
7145.33868889057259-1.33868889057259
7235.09596727846285-2.09596727846285
7365.342365463092290.657634536907713
7455.12614765678628-0.126147656786278
7555.21944837566672-0.219448375666715
7635.31545366142907-2.31545366142907
7755.08539919826947-0.0853991982694717
7844.68224499556821-0.682244995568209
7935.30076539154715-2.30076539154715
8075.314200338663141.68579966133686
8145.03504837907519-1.03504837907519
8245.06743019856796-1.06743019856796
8355.18566895356419-0.185668953564188
8465.160148887473230.839851112526773
8525.08944772625491-3.08944772625491
8624.64888530340015-2.64888530340016
8765.603602064484960.396397935515041
8844.94743361957123-0.947433619571232
8955.39336368784296-0.393363687842963
9064.608760363205371.39123963679463
9175.28769653285941.71230346714060
9285.006289490595882.99371050940412
9364.7974726037981.20252739620200
9464.91013992498971.08986007501030
9534.87209603335481-1.87209603335481
9674.84733789839222.1526621016078
9735.18976525601836-2.18976525601836
9865.1463478519290.853652148071004
9945.09361569041219-1.09361569041219
10045.41694111818036-1.41694111818036
10165.136763511448390.863236488551609
10265.175916446005390.824083553994608
10364.46146829300471.5385317069953
10444.77712812881146-0.777128128811462
10575.090473373398921.90952662660108
10655.1879001490054-0.187900149005396
10775.424713993154231.57528600684577
10845.24090189357536-1.24090189357536
10965.285518978924430.714481021075572
11065.594845449798320.405154550201684
11164.587330732531091.41266926746891
11254.401089516160960.598910483839035
11355.15392280555282-0.153922805552815
11465.271568752936490.72843124706351
11575.038970647413671.96102935258633
11645.15654397665664-1.15654397665664
11745.22866662771908-1.22866662771908
11885.249796921068342.75020307893166
11965.082286635528070.91771336447193
12034.90119712302799-1.90119712302799
12145.07503490646364-1.07503490646364
12255.19853989090188-0.198539890901879
12355.33503620528726-0.335036205287259
12465.346461765546460.65353823445354
12585.209300025407812.79069997459219
12624.75668223784995-2.75668223784995
12744.86042477727682-0.86042477727682
12875.247619367133361.75238063286664
12955.05400111848947-0.0540011184894671
13065.603794118797520.396205881202482
13165.273313467340.726686532659997
13245.23504776712069-1.23504776712069
13355.02284286749076-0.02284286749076
13464.963315703675361.03668429632464
13565.665744532366690.334255467633311
13665.565972035747050.434027964252951
13765.376372560816730.62362743918327
13855.33255931402726-0.332559314027260
13954.860689449730090.139310550269906
14064.982046634505221.01795336549478
14145.235924223821-1.23592422382100
14265.072924103631890.927075896368114
14335.59025775570656-2.59025775570656
14465.175221265980260.824778734019736
14585.19636233696692.8036376630331
14645.12263925134477-1.12263925134477


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.0697370036806790.1394740073613580.930262996319321
80.03656776064764240.07313552129528470.963432239352358
90.03317360244552120.06634720489104230.966826397554479
100.1219442736480850.2438885472961690.878055726351915
110.2489679271815290.4979358543630580.751032072818471
120.2264108648262820.4528217296525640.773589135173718
130.1540137791848720.3080275583697440.845986220815128
140.1353651557569240.2707303115138490.864634844243076
150.09923629931716530.1984725986343310.900763700682835
160.1327132281924090.2654264563848170.867286771807591
170.08917119189311230.1783423837862250.910828808106888
180.0775105141634560.1550210283269120.922489485836544
190.0655327659356730.1310655318713460.934467234064327
200.0584664042460920.1169328084921840.941533595753908
210.1019418366301010.2038836732602020.898058163369899
220.1764964432939100.3529928865878200.82350355670609
230.1329465752057680.2658931504115370.867053424794232
240.3403956095079930.6807912190159850.659604390492007
250.2851906888590210.5703813777180420.714809311140979
260.2498248325705740.4996496651411470.750175167429426
270.2241160617677120.4482321235354250.775883938232288
280.2126130417094870.4252260834189740.787386958290513
290.1706487703929960.3412975407859920.829351229607004
300.1946236046374200.3892472092748390.80537639536258
310.1554931009893300.3109862019786610.84450689901067
320.1656171955260320.3312343910520640.834382804473968
330.1418008807787300.2836017615574600.85819911922127
340.1222428452594910.2444856905189830.877757154740509
350.09861116521739730.1972223304347950.901388834782603
360.2882976225558780.5765952451117560.711702377444122
370.2706165871869310.5412331743738630.729383412813069
380.2361175790208690.4722351580417390.76388242097913
390.3001429935436340.6002859870872680.699857006456366
400.364615957018680.729231914037360.63538404298132
410.3352948872815410.6705897745630820.664705112718459
420.4189189936534520.8378379873069040.581081006346548
430.6268189421969870.7463621156060250.373181057803013
440.7325432713583070.5349134572833870.267456728641693
450.6879425295016520.6241149409966960.312057470498348
460.6509438638447760.6981122723104480.349056136155224
470.6858448131103750.6283103737792490.314155186889625
480.6478225013474490.7043549973051020.352177498652551
490.6226543018082450.7546913963835090.377345698191755
500.5747197357595920.8505605284808160.425280264240408
510.528649120124910.942701759750180.47135087987509
520.4846738934138480.9693477868276970.515326106586152
530.4358574804915590.8717149609831180.564142519508441
540.4067926338795590.8135852677591190.59320736612044
550.389449998779760.778899997559520.61055000122024
560.3566768010151550.7133536020303110.643323198984844
570.4569474703821980.9138949407643960.543052529617802
580.4337757098101770.8675514196203550.566224290189823
590.4018525710602870.8037051421205730.598147428939713
600.3900744991557610.7801489983115230.609925500844239
610.3556703857947030.7113407715894060.644329614205297
620.3125709620990430.6251419241980860.687429037900957
630.2757827986465040.5515655972930090.724217201353496
640.2465547700305410.4931095400610820.753445229969459
650.2279162618362690.4558325236725390.77208373816373
660.2238607316002220.4477214632004450.776139268399778
670.1996902178811340.3993804357622670.800309782118866
680.1952939492289730.3905878984579460.804706050771027
690.2250651019001960.4501302038003920.774934898099804
700.2251897341279940.4503794682559890.774810265872006
710.2215996833171010.4431993666342020.778400316682899
720.268024282507930.536048565015860.73197571749207
730.2381788480364470.4763576960728940.761821151963553
740.2025983596836590.4051967193673180.797401640316341
750.1709530652928540.3419061305857070.829046934707146
760.2287073545723140.4574147091446270.771292645427686
770.1939730088831710.3879460177663420.806026991116829
780.1702765605007170.3405531210014350.829723439499283
790.2288992061158590.4577984122317170.771100793884141
800.2444447995312780.4888895990625570.755555200468721
810.2281169844676910.4562339689353830.771883015532309
820.2149828541926840.4299657083853690.785017145807316
830.1821438747784890.3642877495569770.817856125221511
840.1618074260442830.3236148520885660.838192573955717
850.3082108025839330.6164216051678650.691789197416067
860.4466105600310510.8932211200621020.553389439968949
870.4022055277120210.8044110554240430.597794472287979
880.3825942326220490.7651884652440970.617405767377951
890.3396147994766920.6792295989533850.660385200523308
900.3355202707217550.671040541443510.664479729278245
910.3499127315902140.6998254631804270.650087268409786
920.5070889507649690.9858220984700630.492911049235031
930.4879380756374880.9758761512749760.512061924362512
940.4628280288401240.9256560576802490.537171971159876
950.5189203637862920.9621592724274160.481079636213708
960.5848628858224680.8302742283550640.415137114177532
970.6686086484308910.6627827031382170.331391351569109
980.634406149077090.731187701845820.36559385092291
990.6374132014896750.725173597020650.362586798510325
1000.6551230631940370.6897538736119270.344876936805963
1010.6210940287122920.7578119425754150.378905971287708
1020.5856423399007460.8287153201985090.414357660099254
1030.5699698259245280.8600603481509440.430030174075472
1040.545589706689070.908820586621860.45441029331093
1050.5738503556576960.8522992886846070.426149644342304
1060.522361315703210.955277368593580.47763868429679
1070.5209362334697560.9581275330604890.479063766530244
1080.5232961548133520.9534076903732950.476703845186648
1090.4760684259724730.9521368519449460.523931574027527
1100.4215869839463580.8431739678927160.578413016053642
1110.4215874805712900.8431749611425790.57841251942871
1120.3824903272850580.7649806545701160.617509672714942
1130.3337052977072150.667410595414430.666294702292785
1140.3042245525391060.6084491050782120.695775447460894
1150.3340361320362390.6680722640724790.665963867963761
1160.3306404471530090.6612808943060190.66935955284699
1170.3405136168576550.681027233715310.659486383142345
1180.5205881619670750.958823676065850.479411838032925
1190.5050658575852840.9898682848294330.494934142414716
1200.5855028149258880.8289943701482240.414497185074112
1210.5886303863947110.8227392272105780.411369613605289
1220.5547860451360290.8904279097279420.445213954863971
1230.5235634458353290.9528731083293420.476436554164671
1240.4563234656058970.9126469312117930.543676534394103
1250.5949967600939970.8100064798120060.405003239906003
1260.8381674052808680.3236651894382630.161832594719132
1270.9232914040574830.1534171918850340.0767085959425172
1280.9279412439825350.1441175120349290.0720587560174647
1290.891953435611120.2160931287777600.108046564388880
1300.8616642428912210.2766715142175580.138335757108779
1310.8116867804311740.3766264391376530.188313219568826
1320.9540526647856660.09189467042866870.0459473352143344
1330.9584725101467850.08305497970643030.0415274898532151
1340.928524494335920.1429510113281580.071475505664079
1350.9535312767494160.09293744650116810.0464687232505841
1360.9091602138531270.1816795722937460.0908397861468732
1370.9478473000266350.1043053999467310.0521526999733654
1380.9024069692890060.1951860614219870.0975930307109936
1390.7888047870703520.4223904258592960.211195212929648


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 level50.037593984962406OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/10fgw31292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/10fgw31292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/18xha1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/18xha1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/28xha1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/28xha1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/38xha1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/38xha1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/406yu1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/406yu1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/506yu1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/506yu1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/606yu1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/606yu1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/7txxg1292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/7txxg1292184115.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/8ram71292184115.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184077a9olm1hcyysls09/8ram71292184115.ps (open in new window)


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