Home » date » 2010 » Nov » 24 »

*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: Wed, 24 Nov 2010 07:11:14 +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/Nov/24/t12905825896qbs43g4nnzsm2y.htm/, Retrieved Wed, 24 Nov 2010 08:09:49 +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/Nov/24/t12905825896qbs43g4nnzsm2y.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 «
3 3 4 4 3 3 3 4 2 2 4 4 3 4 2 3 3 4 3 1 3 2 3 3 3 3 3 4 1 2 3 4 4 4 4 2 2 4 3 2 3 3 4 4 4 3 4 2 1 1 3 3 2 4 4 3 3 4 3 3 3 4 4 4 4 2 2 4 4 2 3 2 4 1 2 3 3 3 4 2 2 2 4 2 3 3 4 4 4 3 2 2 3 2 2 1 1 2 3 2 2 3 2 3 1 3 4 4 3 4 3 2 3 3 4 3 3 4 2 2 3 3 4 4 4 3 4 3 4 4 2 3 3 4 4 3 3 2 4 3 3 4 3 4 3 4 4 4 2 2 3 4 3 2 2 3 3 3 4 2 3 4 4 3 4 3 3 2 2 1 2 2 4 2 4 3 4 3 4 4 3 3 4 3 1 3 2 2 2 2 3 4 3 4 3 4 4 4 4 4 3 4 4 3 3 3 4 3 1 1 1 2 5 2 3 2 2 3 2 2 3 3 3 2 1 4 4 4 4 3 4 5 4 3 4 2 2 5 2 1 1 3 3 2 4 3 3 4 4 4 3 2 4 1 1 1 2 2 5 4 3 3 4 2 4 2 2 4 3 2 3 4 4 4 4 3 3 3 4 3 2 3 3 3 2 4 4 3 4 4 1 1 2 2 2 3 4 4 3 4 2 2 4 2 2 4 4 4 4 4 3 4 3 5 5 4 4 4 3 4 3 2 3 1 1 3 4 4 3 3 3 2 4 4 4 3 4 4 2 1 3 4 4 3 3 1 1 4 1 1 3 4 4 3 4 3 4 4 2 4 3 3 4 3 2 2 3 2 4 4 3 3 3 3 3 3 3 4 4 4 3 3 4 4 4 2 3 3 3 4 3 4 4 2 1 2 1 4 1 2 2 3 4 2 1 3 4 3 3 3 3 3 3 4 3 2 3 3 1 3 2 4 3 1 1 3 3 4 3 3 2 2 4 2 2 3 3 2 2 3 4 4 4 3 4 2 3 3 2 2 3 4 4 2 2 2 3 3 3 3 4 4 4 4 4 3 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
New[t] = + 2.94270390531953 + 0.185263472328658Popularity[t] + 0.0505286866563771Friends[t] -0.087130072775124Known[t] + 0.0597825118886497Names[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.942703905319530.24362412.078900
Popularity0.1852634723286580.0955061.93980.0542650.027133
Friends0.05052868665637710.0897760.56280.5743860.287193
Known-0.0871300727751240.075564-1.15310.2507080.125354
Names0.05978251188864970.0715940.8350.4050270.202514


Multiple Linear Regression - Regression Statistics
Multiple R0.247547090880362
R-squared0.06127956220333
Adjusted R-squared0.0364127956391799
F-TEST (value)2.46431565781758
F-TEST (DF numerator)4
F-TEST (DF denominator)151
p-value0.0475045513703866
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.70860242857057
Sum Squared Residuals75.8197276681926


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
143.480907626840090.519092373159909
243.595385260501690.404614739498314
333.65691727393647-0.656917273936472
443.448472675837910.551527324162088
533.51750901295883-0.517509012958834
643.682515333276810.317484666723191
743.591218825385110.408781174614886
843.272463028741530.727536971258473
943.540690138728740.459309861271263
1023.67326150804454-1.67326150804454
1123.54069013872874-1.54069013872874
1243.568037699615210.431962300384789
1343.591218825385110.408781174614886
1443.18533295596640.814667044033597
1543.631986646620430.368013353379568
1633.42112511495144-0.421125114951438
1743.41937561340530.5806243865947
1843.531436313496460.468563686503536
1933.35959310151665-0.359593101516651
2023.03667086975649-1.03667086975649
2123.26320920350925-1.26320920350925
2243.678348898160240.321651101839762
2333.57729152484748-0.577291524847484
2443.595385260501690.404614739498315
2543.540690138728740.459309861271263
2633.59121882538511-0.591218825385114
2733.35542666640008-0.355426666400079
2823.48090762684009-1.48090762684009
2933.53143631349646-0.531436313496464
3043.831177419486720.168822580513280
3133.64591394715806-0.645913947158063
3233.42112511495144-0.421125114951438
3343.678348898160240.321651101839762
3423.53560274861304-1.53560274861304
3543.479158125293950.52084187470605
3633.59121882538511-0.591218825385114
3743.448472675837910.551527324162088
3823.54485657384531-1.54485657384531
3933.53143631349646-0.531436313496464
4043.776482297713770.223517702286228
4143.618566386271590.381433613728412
4233.67326150804454-0.673261508044537
4353.234112141076641.76588785892336
4433.35959310151665-0.359593101516651
4533.53560274861304-0.535602748613036
4643.716699785825120.283300214174878
4743.914141057145270.0858589428547271
4853.2998105896281.700189410372
4933.34442333962167-0.344423339621670
5043.540690138728740.459309861271263
5143.572204134731780.427795865268217
5223.03250443463992-1.03250443463992
5343.714950284278990.285049715721015
5443.272463028741530.727536971258473
5543.591218825385110.408781174614886
5633.48090762684009-0.480907626840087
5733.32299171539790-0.322991715397904
5833.77648229771377-0.776482297713772
5923.12380094253162-1.12380094253162
6043.678348898160240.321651101839762
6143.359593101516650.640406898483349
6243.776482297713770.223517702286228
6333.56387126449864-0.56387126449864
6443.863612370488900.136387629511104
6533.57220413473178-0.572204134731783
6643.618566386271590.381433613728412
6743.490161452072360.50983854792764
6843.586131435269410.413868564730587
6943.618566386271590.381433613728412
7043.151148503418090.84885149658191
7143.678348898160240.321651101839762
7243.765478970935360.234521029064638
7343.508255187726560.491744812273438
7423.35542666640008-1.35542666640008
7533.56803769961521-0.568037699615211
7643.540690138728740.459309861271263
7743.540690138728740.459309861271263
7833.4425567391752-0.442556739175203
7943.586131435269410.413868564730587
8043.39619448763540.603805512364602
8143.350339276284380.649660723715622
8233.61856638627159-0.618566386271588
8333.48090762684009-0.480907626840087
8433.5570343728368-0.557034372836801
8533.48799803571588-0.487998035715879
8643.568037699615210.431962300384789
8743.359593101516650.640406898483349
8823.65516777239034-1.65516777239034
8943.863612370488900.136387629511104
9033.41012178817303-0.410121788173028
9143.645913947158060.354086052841937
9233.38277422728655-0.382774227286554
9343.776482297713770.223517702286228
9433.59121882538511-0.591218825385114
9533.71495028427899-0.714950284278985
9643.544856573845310.455143426154692
9733.52167544807541-0.521675448075406
9843.359593101516650.640406898483349
9923.57729152484748-1.57729152484748
10043.753301171943870.246698828056131
10143.776482297713770.223517702286228
10243.776482297713770.223517702286228
10343.480907626840090.519092373159913
10443.595385260501690.404614739498315
10533.15114850341809-0.151148503418090
10643.693518660055220.306481339944781
10733.22485831584437-0.22485831584437
10843.678348898160240.321651101839762
10933.27246302874153-0.272463028741527
11023.299810589628-1.29981058962800
11133.50825518772656-0.508255187726562
11223.71495028427899-1.71495028427899
11343.410121788173030.589878211826972
11443.618566386271590.381433613728412
11543.705696459046710.294303540953288
11613.80382985860025-2.80382985860025
11743.776482297713770.223517702286228
11843.544856573845310.455143426154692
11943.540690138728740.459309861271263
12033.67834889816024-0.678348898160238
12143.568037699615210.431962300384789
12243.591218825385110.408781174614886
12333.23411214107664-0.234112141076643
12443.493085425831580.50691457416842
12543.716699785825120.283300214174878
12643.682515333276810.317484666723191
12743.716699785825120.283300214174878
12843.540690138728740.459309861271263
12933.41012178817303-0.410121788173028
13033.15114850341809-0.151148503418090
13143.656917273936470.343082726063528
13243.765478970935360.234521029064638
13343.544856573845310.455143426154692
13443.508255187726560.491744812273438
13543.803829858600250.196170141399754
13643.595385260501690.404614739498315
13743.678348898160240.321651101839762
13843.146982068301520.853017931698481
13943.827010984370150.172989015629851
14033.38277422728655-0.382774227286554
14133.40595535305646-0.405955353056456
14243.627820211503860.372179788496139
14343.531436313496460.468563686503536
14423.27246302874153-1.27246302874153
14543.595385260501690.404614739498315
14643.622732821388160.37726717861184
14743.359593101516650.640406898483349
14853.295644154511431.70435584548857
14943.591218825385110.408781174614886
15043.803829858600250.196170141399754
15143.753301171943870.246698828056131
15243.863612370488900.136387629511104
15343.359593101516650.640406898483349
15443.678348898160240.321651101839762
15543.531436313496460.468563686503536
15643.595385260501690.404614739498315


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.1100674221466740.2201348442933480.889932577853326
90.07990123669564540.1598024733912910.920098763304355
100.6843700049198340.6312599901603320.315629995080166
110.9352893129081330.1294213741837350.0647106870918674
120.9131755041402660.1736489917194680.086824495859734
130.8821628889763070.2356742220473850.117837111023693
140.8376377561292370.3247244877415250.162362243870763
150.8033606271365870.3932787457268260.196639372863413
160.7679253906140610.4641492187718780.232074609385939
170.7027733917024110.5944532165951780.297226608297589
180.6617948773828450.676410245234310.338205122617155
190.6787148368880120.6425703262239760.321285163111988
200.840597188360440.318805623279120.15940281163956
210.863870479127270.2722590417454590.136129520872729
220.8254962400645960.3490075198708090.174503759935404
230.840363108336910.3192737833261790.159636891663090
240.816017153851090.3679656922978190.183982846148910
250.7766584228207790.4466831543584430.223341577179221
260.7644249904405220.4711500191189570.235575009559478
270.7213134545345520.5573730909308960.278686545465448
280.847748419700030.304503160599940.15225158029997
290.8192647332018460.3614705335963080.180735266798154
300.779775183683330.440449632633340.22022481631667
310.752892260767760.4942154784644790.247107739232240
320.7116526715204990.5766946569590020.288347328479501
330.6711593894492070.6576812211015860.328840610550793
340.7806513208996570.4386973582006850.219348679100343
350.7500051367379480.4999897265241040.249994863262052
360.7307491623281060.5385016753437870.269250837671894
370.7506751916136020.4986496167727960.249324808386398
380.8683567175482980.2632865649034030.131643282451702
390.8494348221801310.3011303556397380.150565177819869
400.8188623527297070.3622752945405870.181137647270293
410.7981807021665280.4036385956669430.201819297833472
420.7791984598120530.4416030803758940.220801540187947
430.912128423703680.1757431525926390.0878715762963194
440.8950243514296240.2099512971407520.104975648570376
450.8818338169869950.2363323660260100.118166183013005
460.8690319349771040.2619361300457920.130968065022896
470.8400875871112520.3198248257774950.159912412888748
480.9492905376785960.1014189246428080.0507094623214039
490.9456403880590080.1087192238819840.054359611940992
500.9366085487543920.1267829024912150.0633914512456076
510.9273533777469860.1452932445060280.0726466222530141
520.94424538153660.1115092369268010.0557546184634006
530.9326200552164030.1347598895671930.0673799447835967
540.9332116201696760.1335767596606480.0667883798303242
550.9227685648583270.1544628702833470.0772314351416733
560.9129894325906560.1740211348186870.0870105674093437
570.8978158917959130.2043682164081730.102184108204087
580.9005654465316480.1988691069367030.0994345534683515
590.930441184711390.1391176305772200.0695588152886102
600.9172094730641780.1655810538716430.0827905269358216
610.9133917464312670.1732165071374670.0866082535687335
620.895158339024650.2096833219506990.104841660975349
630.887519385982870.2249612280342600.112480614017130
640.8644886125398060.2710227749203880.135511387460194
650.8553455261384970.2893089477230070.144654473861503
660.8361878405954470.3276243188091060.163812159404553
670.8198839431254190.3602321137491630.180116056874581
680.8034731287807720.3930537424384560.196526871219228
690.7791818655568770.4416362688862450.220818134443123
700.7915685974910590.4168628050178820.208431402508941
710.764211884239090.471576231521820.23578811576091
720.7367227995001350.526554400999730.263277200499865
730.7161127185922030.5677745628155940.283887281407797
740.8165565496758820.3668869006482370.183443450324118
750.8069868343572730.3860263312854540.193013165642727
760.7862541886184230.4274916227631550.213745811381577
770.7641807883855320.4716384232289360.235819211614468
780.740937941789340.5181241164213210.259062058210660
790.715245880993070.569508238013860.28475411900693
800.713468484362880.5730630312742410.286531515637121
810.7018404311965020.5963191376069960.298159568803498
820.6965009477257740.6069981045484520.303499052274226
830.6865942903008230.6268114193983530.313405709699177
840.6672991260340750.6654017479318490.332700873965925
850.6496085553231190.7007828893537620.350391444676881
860.6203814788266370.7592370423467250.379618521173363
870.612287512936280.775424974127440.38771248706372
880.7824527512094850.4350944975810300.217547248790515
890.7482203791852910.5035592416294180.251779620814709
900.7274317427201230.5451365145597550.272568257279877
910.6938560488708890.6122879022582220.306143951129111
920.6686463958565950.662707208286810.331353604143405
930.6277383042156070.7445233915687860.372261695784393
940.6262869044476980.7474261911046040.373713095552302
950.6137330561785410.7725338876429180.386266943821459
960.59044293465090.81911413069820.4095570653491
970.5622548933271490.8754902133457010.437745106672851
980.5535245078069810.8929509843860370.446475492193019
990.7191680583510710.5616638832978580.280831941648929
1000.6802624052136060.6394751895727880.319737594786394
1010.6380562176413280.7238875647173440.361943782358672
1020.5936156439488240.8127687121023520.406384356051176
1030.5602106362202620.8795787275594760.439789363779738
1040.5264965583574520.9470068832850960.473503441642548
1050.4778833450334890.9557666900669780.522116654966511
1060.4339447708630130.8678895417260250.566055229136987
1070.3951482298348620.7902964596697230.604851770165138
1080.3542073434825380.7084146869650750.645792656517462
1090.3243880811066250.648776162213250.675611918893375
1100.4841321602467920.9682643204935840.515867839753208
1110.4892128777633610.9784257555267220.510787122236639
1120.7158471643759380.5683056712481230.284152835624062
1130.6914762780637120.6170474438725750.308523721936288
1140.6522097010411880.6955805979176230.347790298958812
1150.6116374437346080.7767251125307840.388362556265392
1160.9988124921919530.002375015616094530.00118750780804726
1170.9981484275544670.003703144891065320.00185157244553266
1180.9971870807659230.005625838468153960.00281291923407698
1190.9957441837315650.008511632536870240.00425581626843512
1200.9975424833855260.004915033228947080.00245751661447354
1210.996216654435610.007566691128778810.00378334556438941
1220.9941980205979230.01160395880415450.00580197940207724
1230.992689747084670.01462050583066070.00731025291533033
1240.989971683172690.02005663365461830.0100283168273091
1250.984914828557990.03017034288401920.0150851714420096
1260.9780986920903860.04380261581922730.0219013079096137
1270.9682312217129650.06353755657406990.0317687782870350
1280.9547981326546330.09040373469073450.0452018673453672
1290.9525735942279030.0948528115441940.047426405772097
1300.9438315222263330.1123369555473340.0561684777736671
1310.9209411576335830.1581176847328350.0790588423664175
1320.8904309971403960.2191380057192090.109569002859604
1330.8543737635501980.2912524728996040.145626236449802
1340.811983471732010.3760330565359810.188016528267991
1350.7554973998177560.4890052003644880.244502600182244
1360.6922697070896830.6154605858206340.307730292910317
1370.6189835901650470.7620328196699060.381016409834953
1380.6000236530801470.7999526938397050.399976346919853
1390.5212195796287380.9575608407425230.478780420371262
1400.5030459599259150.993908080148170.496954040074085
1410.6126601382587530.7746797234824940.387339861741247
1420.5172131191281320.9655737617437350.482786880871868
1430.4189835536073870.8379671072147750.581016446392613
1440.9946876317006980.01062473659860420.00531236829930212
1450.9852496146235040.0295007707529910.0147503853764955
1460.9715343893442330.05693122131153340.0284656106557667
1470.9354816039092090.1290367921815820.064518396090791
14813.89377133056926e-451.94688566528463e-45


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level70.049645390070922NOK
5% type I error level140.099290780141844NOK
10% type I error level180.127659574468085NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/10cnje1290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/10cnje1290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/165n31290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/165n31290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/265n31290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/265n31290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/3ye461290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/3ye461290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/4ye461290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/4ye461290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/5ye461290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/5ye461290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/6r53r1290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/6r53r1290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/72wkt1290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/72wkt1290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/82wkt1290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/82wkt1290582663.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/92wkt1290582663.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905825896qbs43g4nnzsm2y/92wkt1290582663.ps (open in new window)


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