Home » date » 2010 » Nov » 21 »

Meervoudige regressie Happiness 1

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 21 Nov 2010 13:53:20 +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/21/t129034778188teu6cc167s7f7.htm/, Retrieved Sun, 21 Nov 2010 14:56:21 +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/21/t129034778188teu6cc167s7f7.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 «
15 10 77 46 15 12 13 6 11 6 4 15 16 9 20 63 37 12 7 11 4 26 5 4 23 24 12 16 73 45 15 13 14 6 26 20 10 26 22 15 10 76 46 12 11 12 5 15 12 6 19 21 17 8 90 55 14 16 12 5 10 11 5 19 23 14 14 67 40 8 10 6 4 21 12 8 16 23 9 19 69 43 11 15 10 5 27 11 9 23 21 11 23 54 33 4 4 10 2 21 13 8 19 22 13 9 54 33 13 7 12 5 21 9 11 24 20 16 12 76 47 19 15 15 6 22 14 6 19 12 16 14 75 44 10 5 13 6 29 12 8 25 23 15 13 76 47 15 16 18 8 29 18 11 23 23 10 11 80 49 6 15 11 6 29 9 5 31 30 16 11 89 55 7 13 12 3 30 15 10 29 22 12 10 73 43 14 13 13 6 19 12 7 18 21 15 12 74 46 16 15 14 6 19 12 7 17 21 13 18 78 51 16 15 16 7 22 12 13 22 15 18 12 76 47 14 10 16 8 18 15 10 21 22 13 10 69 42 15 17 16 6 28 11 8 24 24 17 15 74 42 14 14 15 7 17 13 6 22 23 14 15 82 48 12 9 13 4 18 10 8 16 15 13 12 77 45 9 6 8 4 20 17 7 22 24 13 9 84 51 12 11 14 2 16 13 5 21 24 15 11 75 46 14 13 15 6 17 17 9 25 21 15 16 79 47 14 10 16 6 25 15 11 22 21 13 17 79 47 10 4 13 6 22 13 11 24 18 13 11 88 55 16 15 15 7 31 17 9 25 19 16 13 57 36 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 time10 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 17.3893058309824 -0.369421768925105Depression[t] + 0.0673020022887946Belonging[t] -0.0489287737012476BelongingFinal[t] -0.0937609856736327Popularity[t] -0.0384462079358146KnowingPeople[t] + 0.0656628197343761Liked[t] + 0.130635340805913Celebrity[t] -0.0539467717320201ConcernOverMistakes[t] + 0.097263567422785ParentalExpectations[t] -0.0906357963563662ParentalCriticism[t] + 0.043090642762466PersonalStandards[t] -0.0673752186150563Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.38930583098242.513856.917400
Depression-0.3694217689251050.060753-6.080700
Belonging0.06730200228879460.0534921.25820.2106920.105346
BelongingFinal-0.04892877370124760.075322-0.64960.5171540.258577
Popularity-0.09376098567363270.090697-1.03380.303250.151625
KnowingPeople-0.03844620793581460.069841-0.55050.582980.29149
Liked0.06566281973437610.106270.61790.5377840.268892
Celebrity0.1306353408059130.1810690.72150.4719810.235991
ConcernOverMistakes-0.05394677173202010.03594-1.5010.1358880.067944
ParentalExpectations0.0972635674227850.0642341.51420.132520.06626
ParentalCriticism-0.09063579635636620.083458-1.0860.2795850.139792
PersonalStandards0.0430906427624660.0513960.83840.4034130.201707
Organization-0.06737521861505630.051073-1.31920.1895320.094766


Multiple Linear Regression - Regression Statistics
Multiple R0.598500396625606
R-squared0.358202724761007
Adjusted R-squared0.296093311028202
F-TEST (value)5.76728555677554
F-TEST (DF numerator)12
F-TEST (DF denominator)124
p-value7.55891645942697e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.98907390262861
Sum Squared Residuals490.595458774659


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11515.5922580224144-0.592258022414358
2910.3763471898270-1.37634718982703
31213.2610841337057-1.26108413370568
41515.6703962274125-0.670396227412501
51716.65971147333180.340288526668162
61413.00046707611620.999532923883771
7910.9857534804041-1.9857534804041
81110.04425904390500.955740956094975
91314.4694499681551-1.46944996815505
101614.82341268466831.17658731533166
111614.02502909871191.97497090128810
121514.23833084338630.761669156613684
131014.8514507853627-4.85145078536272
141615.34976050568740.650239494312601
151215.1976467889243-3.19764678892434
161514.13747672201220.8625232779878
171312.12152066155360.87847933844641
181815.17431872236152.82568127763846
191314.3098080866189-1.30980808661894
201714.02368853369072.97631146630934
211413.87850208456590.121497915434081
221315.1811052970486-2.18110529704858
231316.0910179849196-3.09101798491963
241515.6619426301443-0.661942630144332
251513.27946963481271.7205303651873
261313.5744007187145-0.574400718714475
271315.3422262831563-2.34222628315628
281613.31510828809342.68489171190657
291415.9534990870273-1.9534990870273
301815.98882710074882.01117289925119
31910.7837882163600-1.78378821635997
321616.1255323657905-0.125532365790519
331615.18572386570020.81427613429977
341714.77832859045492.2216714095451
351315.1252718748917-2.12527187489165
361713.94566361025963.05433638974035
371513.09594495682811.90405504317186
381414.1172809572284-0.117280957228351
391012.1478420918796-2.14784209187965
401314.2143000310942-1.21430003109421
411113.2626123550771-2.26261235507708
421113.0253576083747-2.02535760837472
431515.4519651950179-0.451965195017864
441515.2603954602792-0.260395460279236
451212.5222703421012-0.522270342101192
461714.72918940346842.27081059653161
471513.70872361676341.29127638323656
481615.57270776277090.427292237229146
491413.93571827097400.0642817290259524
501714.73503323978092.26496676021906
511010.3428067365893-0.342806736589346
521114.0354719963516-3.03547199635159
531514.05897729010770.941022709892318
541514.73521169889520.264788301104821
55710.6167900207868-3.61679002078684
561714.98558987424212.01441012575788
571413.12970425128690.870295748713117
581815.78154287114312.21845712885694
591413.93521814071910.0647818592809266
601415.2895859629806-1.2895859629806
61915.6732330420276-6.67323304202762
621414.3648153945076-0.364815394507583
631112.5319859520448-1.53198595204482
641613.64742583609482.35257416390516
651715.04442324610641.95557675389359
661215.1335968952848-3.13359689528478
671514.14461844130090.855381558699093
681515.5932417098202-0.593241709820164
691616.3140717474382-0.31407174743823
701616.6334281632169-0.633428163216929
711112.5046700257125-1.50467002571253
721212.7739898806394-0.773989880639433
731414.1219496567694-0.121949656769382
741515.7079336124191-0.707933612419097
751715.67400373682941.32599626317064
761914.66191593336554.33808406663445
771513.75955156865711.24044843134293
781612.9269640143053.07303598569499
791414.5226103599700-0.522610359970031
801611.50874361188924.49125638811078
811514.50136751280320.498632487196845
821714.46132214048052.53867785951953
831214.4616919466267-2.46169194662671
841814.80587080703473.19412919296535
851314.3291907616437-1.32919076164374
861413.28046623889450.719533761105549
871413.71517150104230.284828498957662
881414.2258232926222-0.225823292622172
891214.4414756042756-2.44147560427561
901413.05832670452830.941673295471697
911213.3139957417549-1.31399574175488
921514.63458657907940.365413420920584
931112.543957626866-1.54395762686600
941515.2746915466298-0.274691546629762
951414.4082683371557-0.408268337155737
961513.64499612632091.35500387367912
971614.32915132404611.67084867595388
981411.35397754820192.64602245179807
991815.93068891711022.06931108288978
1001415.0945360835772-1.09453608357724
1011312.64098213605600.359017863944032
1021412.59777195296051.40222804703946
1031414.7185273175246-0.718527317524611
1041715.59005382934381.40994617065617
1051212.8424499485455-0.842449948545538
1061613.79610721492732.20389278507266
1071012.3287532128499-2.32875321284993
1081314.5643015234240-1.56430152342403
1091515.3301671929391-0.330167192939076
1101614.99375885942511.00624114057488
1111412.82428937878461.17571062121543
1121312.43889008692890.561109913071106
1131714.76590877071562.23409122928439
1141413.98042499054770.0195750094522665
1151612.99475845318663.00524154681336
1161214.0065703068552-2.00657030685520
1171614.32351826574911.67648173425089
118810.5607830856912-2.56078308569116
119912.1883336587029-3.18833365870288
1201311.88312891650831.11687108349165
1211915.21762781961933.78237218038072
1221112.4318895916441-1.43188959164413
1231514.87358065384990.126419346150068
1241113.4466997710899-2.44669977108987
1251515.8492974720167-0.849297472016677
1261616.0832409374489-0.0832409374488868
1271512.81151584998492.18848415001507
1281212.9738247901357-0.973824790135663
1291615.11674616185080.88325383814922
1301513.07875416595591.92124583404405
1311314.6048003186335-1.60480031863350
1321413.98559819044390.0144018095560894
1331113.3938277336665-2.39382773366646
1341514.66308246625440.336917533745566
1351412.72389536920181.27610463079824
1361316.0418341374656-3.04183413746564
1371516.0687584843007-1.06875848430071


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.1352253417518210.2704506835036420.864774658248179
170.1884891193235220.3769782386470450.811510880676478
180.1241621701370850.2483243402741690.875837829862915
190.1304891203062530.2609782406125060.869510879693747
200.575667921168350.84866415766330.42433207883165
210.6482155230081880.7035689539836240.351784476991812
220.6766241340406490.6467517319187020.323375865959351
230.6783719089626230.6432561820747550.321628091037377
240.5965193253830090.8069613492339820.403480674616991
250.5199800295865430.9600399408269140.480019970413457
260.531152701110090.937694597779820.46884729888991
270.5146949172847930.9706101654304140.485305082715207
280.6699882688637480.6600234622725030.330011731136252
290.650559409515690.698881180968620.34944059048431
300.6625761905351910.6748476189296180.337423809464809
310.6432599624312070.7134800751375860.356740037568793
320.5778542819058080.8442914361883840.422145718094192
330.5151584176825420.9696831646349160.484841582317458
340.5424805551758640.9150388896482730.457519444824136
350.517507810884880.964984378230240.48249218911512
360.6159385020009040.7681229959981910.384061497999096
370.6884050923644360.6231898152711270.311594907635564
380.6339818389472920.7320363221054150.366018161052708
390.6137169871113020.7725660257773960.386283012888698
400.5889397002817410.8221205994365190.411060299718259
410.5883445330037220.8233109339925550.411655466996277
420.614177249626950.77164550074610.38582275037305
430.5554332965824560.8891334068350880.444566703417544
440.496029442436640.992058884873280.50397055756336
450.445976813443240.891953626886480.55402318655676
460.5079056284900390.9841887430199230.492094371509961
470.516302972763820.967394054472360.48369702723618
480.4724743178875390.9449486357750780.527525682112461
490.4167024373105550.833404874621110.583297562689445
500.4164219321355890.8328438642711790.58357806786441
510.3708105334708630.7416210669417250.629189466529137
520.4508850094205930.9017700188411860.549114990579407
530.416890857905620.833781715811240.58310914209438
540.3635592363786110.7271184727572230.636440763621389
550.4944881313805270.9889762627610540.505511868619473
560.4833550722578850.966710144515770.516644927742115
570.4659593337573220.9319186675146440.534040666242678
580.4756158083858500.9512316167717010.52438419161415
590.4218139243012540.8436278486025090.578186075698746
600.3800292881071410.7600585762142820.619970711892859
610.8569980761636610.2860038476726780.143001923836339
620.8282798683385030.3434402633229940.171720131661497
630.8052311796657070.3895376406685860.194768820334293
640.8121863922031460.3756272155937080.187813607796854
650.8257579089546120.3484841820907770.174242091045388
660.9038261710879780.1923476578240440.0961738289120219
670.8832218174971430.2335563650057150.116778182502857
680.8618076826470770.2763846347058450.138192317352923
690.8342332387443650.3315335225112700.165766761255635
700.8108221743630540.3783556512738920.189177825636946
710.8151187519106610.3697624961786770.184881248089339
720.7827044587957380.4345910824085250.217295541204262
730.747302944016250.5053941119675010.252697055983750
740.7305506276716960.5388987446566080.269449372328304
750.7417462202861540.5165075594276930.258253779713846
760.8777341188934780.2445317622130450.122265881106522
770.8580257771341510.2839484457316970.141974222865849
780.8923740440914450.2152519118171090.107625955908554
790.8666789880219750.2666420239560510.133321011978025
800.9617370449185860.0765259101628270.0382629550814135
810.9499889938079430.1000220123841130.0500110061920566
820.949122152098660.1017556958026790.0508778479013397
830.9504839723888820.09903205522223510.0495160276111176
840.964360406586880.0712791868262420.035639593413121
850.9570647708166360.08587045836672710.0429352291833635
860.9454571401182240.1090857197635530.0545428598817765
870.9278108220486750.1443783559026500.0721891779513251
880.9101494250473850.1797011499052290.0898505749526147
890.9110007157643730.1779985684712540.088999284235627
900.8872636928582060.2254726142835870.112736307141793
910.892884796976060.2142304060478800.107115203023940
920.8703031998130040.2593936003739920.129696800186996
930.8480171177817840.3039657644364310.151982882218216
940.8096520755675230.3806958488649540.190347924432477
950.7759129892348090.4481740215303820.224087010765191
960.7594595899965650.4810808200068690.240540410003435
970.8073053068887740.3853893862224520.192694693111226
980.81176186048020.37647627903960.1882381395198
990.7875532020922480.4248935958155030.212446797907752
1000.7514372576913040.4971254846173920.248562742308696
1010.7008321199429470.5983357601141070.299167880057053
1020.6682075382066280.6635849235867440.331792461793372
1030.6092915560996950.781416887800610.390708443900305
1040.5605245679344330.8789508641311340.439475432065567
1050.4988153159540680.9976306319081360.501184684045932
1060.7985693151850510.4028613696298980.201430684814949
1070.8149650846914820.3700698306170370.185034915308518
1080.8474995306156630.3050009387686740.152500469384337
1090.7934566289662560.4130867420674890.206543371033744
1100.747421336349240.5051573273015210.252578663650760
1110.7551056405430610.4897887189138770.244894359456939
1120.6909496864707730.6181006270584530.309050313529227
1130.6179279405848890.7641441188302220.382072059415111
1140.53074161877650.9385167624470.4692583812235
1150.5479550923653350.904089815269330.452044907634665
1160.5787925165208920.8424149669582160.421207483479108
1170.5859750484921050.828049903015790.414024951507895
1180.6042581134745720.7914837730508560.395741886525428
1190.6759334835825280.6481330328349440.324066516417472
1200.679250666819180.6414986663616410.320749333180821
1210.5402030707759810.9195938584480390.459796929224019


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 level40.0377358490566038OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/109en31290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/109en31290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/1kd8r1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/1kd8r1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/2kd8r1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/2kd8r1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/3d47u1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/3d47u1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/4d47u1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/4d47u1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/5d47u1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/5d47u1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/6nv6f1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/6nv6f1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/7g4ni1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/7g4ni1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/8g4ni1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/8g4ni1290347586.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/9g4ni1290347586.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t129034778188teu6cc167s7f7/9g4ni1290347586.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