Home » date » 2010 » Nov » 21 »

Meervoudige regressie Happiness 3

*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 15:35:45 +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/t1290353670wnn84qrk7nj7j93.htm/, Retrieved Sun, 21 Nov 2010 16:34:30 +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/t1290353670wnn84qrk7nj7j93.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 11 6 9 20 63 26 5 12 16 73 26 20 15 10 76 15 12 17 8 90 10 11 14 14 67 21 12 9 19 69 27 11 11 23 54 21 13 13 9 54 21 9 16 12 76 22 14 16 14 75 29 12 15 13 76 29 18 10 11 80 29 9 16 11 89 30 15 12 10 73 19 12 15 12 74 19 12 13 18 78 22 12 18 12 76 18 15 13 10 69 28 11 17 15 74 17 13 14 15 82 18 10 13 12 77 20 17 13 9 84 16 13 15 11 75 17 17 15 16 79 25 15 13 17 79 22 13 13 11 88 31 17 16 13 57 38 21 14 9 69 18 12 18 11 86 20 15 9 20 66 23 8 16 8 54 12 15 16 12 85 20 16 17 10 79 15 9 13 11 84 21 13 17 13 70 20 11 15 13 54 30 9 14 13 70 22 15 10 15 54 33 9 13 12 69 25 15 11 13 68 20 14 11 14 66 21 14 15 9 67 16 12 15 9 71 23 15 12 15 54 25 11 17 10 76 18 11 15 13 77 33 9 16 8 71 18 8 14 15 69 18 13 17 13 73 13 12 10 24 46 24 24 11 11 66 19 11 15 13 77 20 11 15 12 77 21 16 7 22 70 18 12 17 11 86 29 18 14 15 38 13 12 18 7 66 26 14 14 14 75 22 16 14 10 64 28 24 9 9 80 28 13 14 12 86 23 11 11 16 54 22 14 16 13 74 28 12 17 11 88 31 21 12 11 63 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 time8 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 16.295785836819 -0.352003748191891Depression[t] + 0.0327823330796020Belonging[t] -0.0508921511278503ConcernOverMistakes[t] + 0.0834010628945067ParentalExpectations[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)16.2957858368191.6646329.789400
Depression-0.3520037481918910.055802-6.30800
Belonging0.03278233307960200.0164051.99830.0477420.023871
ConcernOverMistakes-0.05089215112785030.031365-1.62260.1070660.053533
ParentalExpectations0.08340106289450670.0513791.62330.1069190.053459


Multiple Linear Regression - Regression Statistics
Multiple R0.577439805903951
R-squared0.333436729442392
Adjusted R-squared0.313237842455798
F-TEST (value)16.5076783519652
F-TEST (DF numerator)4
F-TEST (DF denominator)132
p-value5.43735056979244e-11
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.96470138552339
Sum Squared Residuals509.526802524634


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11515.2405807169901-0.240580716990116
2910.4148072421445-1.41480724214455
31213.4016615091257-1.40166150912573
41515.5046361567662-0.504636156766184
51716.83865600900910.161343990990863
61413.49622725951510.503772740484899
7911.4130192150532-2.41301921505324
8119.985424258647771.01457574135223
91314.5798724817562-1.57987248175621
101614.61118572827651.38881427172354
111613.35134871512912.64865128487089
121514.23654117376760.763458826232353
131014.3210684364193-4.32106843641928
141615.06562366037490.934376339625117
151215.2027205530160-3.20272055301598
161514.53149538971180.468504610288203
171312.39792577949530.602074220504689
181814.89815539568243.10184460431763
191314.5301607976524-1.53016079765241
201713.66066951028633.33933048971367
211413.62183283511180.378167164888222
221314.9959555522953-1.99595555229529
231316.1514074813615-3.15140748136155
241515.4350710877115-0.435071087711524
251513.23224234425871.76775765574134
261312.86611292366130.133887076338690
271315.1487513019564-2.14875130195644
281613.40585067378812.59414932621192
291415.4744871200173-1.47448712001731
301815.47619817241462.52380182758542
31910.9160338834504-1.91603388345043
321615.89031196746580.109688032534207
331615.17481315403760.825186845962405
341715.35277996732151.64722003267853
351315.1929392293385-2.19293922933851
361713.91406909517913.08593090482086
371512.7138281288382.28617187116201
381414.1458890445015-0.145889044501468
391011.8571441790707-1.85714417907066
401314.3124340062302-1.31243400623021
411114.0987076177035-3.09870761770346
421113.6302470522245-2.63024705222451
431515.5107067561138-0.510706756113806
441515.5357942192208-0.535794219220782
451212.4310835138825-0.431083513882478
461715.26855864048811.73144135951187
471513.31514533628531.68485466371471
481615.55845128279040.441548717209623
491413.44586569376050.554134306239527
501714.45206221520742.54793778479259
511010.1358970842751-0.135897084275084
521114.5378394103724-3.53783941037237
531514.14354542673640.856454573263645
541514.86166233827290.138337661727071
55710.9312207266023-3.93122072660233
561715.26837200094741.73162799905255
571412.60067306103761.39932693896244
581815.83981253392852.16018746607150
591414.0411980246021-0.0411980246020936
601415.450462949883-1.45046294988299
61915.4095723355089-6.40957233550893
621414.6379137192611-0.637913719261112
631112.4819594077577-1.48195940775766
641613.72146228136932.27853771863075
651715.48235555353451.51764444646553
661214.6430610156450-2.64306101564496
671514.11213020022150.887869799778519
681515.2496285585010-0.249628558501041
691615.51558169021500.484418309784973
701615.97925410336500.0207458966349813
711112.8087378250599-1.80873782505990
721213.3139323547559-1.31393235475590
731413.83299539279710.167004607202922
741515.2409409200754-0.24094092007536
751715.17664244368221.82335755631784
761914.97868225543854.02131774456146
771514.33163750953020.668362490469764
781613.86834155671812.13165844328187
791414.5093689115154-0.509368911515423
801611.16043989409934.83956010590073
811514.36838773100000.631612269000046
821714.41886859303222.58113140696781
831214.5309485470859-2.53094854708591
841814.71351687315813.28648312684194
851314.6911657454067-1.69116574540674
861412.80092365880971.19907634119033
871414.2921346954522-0.292134695452183
881414.2303837926478-0.230383792647757
891214.3319109308432-2.33191093084318
901412.73764940217901.26235059782103
911213.5245111188314-1.52451111883137
921514.42600036312630.573999636873744
931112.1422682995793-1.14226829957934
941514.96111928001620.0388807199838129
951414.0141271468152-0.0141271468152189
961513.76837028685431.23162971314568
971614.89817165293501.10182834706496
981410.46719023259333.53280976740666
991816.18046283285861.81953716714136
1001415.4175081122892-1.41750811228917
1011312.99515474324460.00484525675543712
1021412.96936631247641.03063368752364
1031414.9275166829977-0.927516682997748
1041715.27226936481801.72773063518203
1051213.4324593684951-1.43245936849512
1061613.7801360842422.21986391575800
1071012.9081459950452-2.90814599504515
1081314.6985871940664-1.69858719406643
1091515.01083096412-0.0108309641199875
1101614.97623772087471.02376227912530
1111413.15349050688010.846509493119878
1121312.78307100482170.216928995178302
1131714.93358728234542.06641271765463
1141413.73702452582870.262975474171276
1151613.15769930207782.84230069792216
1161214.5951623639331-2.59516236393305
1171613.70967916769862.29032083230141
118810.5082467927768-2.50824679277680
119912.1718704937023-3.17187049370232
1201312.59904984944290.400950150557129
1211915.35313911137643.64686088862363
1221112.4399425936265-1.43994259362648
1231515.1675783449186-0.167578344918592
1241113.9316320706015-2.9316320706015
1251515.6892909365432-0.68929093654317
1261615.6472741224120.352725877588004
1271513.02299479895991.97700520104013
1281213.1447540966964-1.14475409669643
1291614.11421665392631.88578334607368
1301513.76536053018571.23463946981429
1311314.6876254033649-1.68762540336491
1321414.4955329176756-0.495532917675576
1331113.3142925578411-2.31429255784111
1341514.18727329326480.8127267067352
1351412.57951865756301.42048134243703
1361315.6456335945343-2.64563359453432
1371516.1068593508943-1.10685935089426


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.07328416301272850.1465683260254570.926715836987272
90.04135841462247210.08271682924494420.958641585377528
100.1816232603684740.3632465207369490.818376739631526
110.4795994404008990.9591988808017980.520400559599101
120.3630894659158660.7261789318317310.636910534084134
130.5856257093985430.8287485812029140.414374290601457
140.5367078218021550.926584356395690.463292178197845
150.6238051069678830.7523897860642340.376194893032117
160.5468002435053820.9063995129892370.453199756494618
170.4598702212126660.9197404424253320.540129778787334
180.5262220678495170.9475558643009650.473777932150483
190.4495893744338230.8991787488676470.550410625566177
200.5100974409165110.9798051181669780.489902559083489
210.4325257740548610.8650515481097210.567474225945139
220.5157378209993330.9685243580013330.484262179000667
230.629448957686760.741102084626480.37055104231324
240.5707084602951760.8585830794096470.429291539704824
250.535752396613370.9284952067732590.464247603386630
260.4712691151588220.9425382303176450.528730884841178
270.4527562200295140.9055124400590290.547243779970486
280.5200559381844320.9598881236311350.479944061815568
290.4718135352416070.9436270704832140.528186464758393
300.5128327547850120.9743344904299750.487167245214988
310.4961740364462250.992348072892450.503825963553775
320.4341609991697580.8683219983395160.565839000830242
330.3779690138966490.7559380277932980.622030986103351
340.4028808944621310.8057617889242620.597119105537869
350.4067803485261230.8135606970522470.593219651473877
360.5181694395223650.9636611209552690.481830560477635
370.5887991139368460.8224017721263080.411200886063154
380.5350525067011840.9298949865976330.464947493298816
390.5106692845057350.978661430988530.489330715494265
400.48134001448860.96268002897720.5186599855114
410.5756541283320740.8486917433358520.424345871667926
420.6222633353030440.7554733293939110.377736664696956
430.570585848643920.858828302712160.42941415135608
440.5182821242917650.963435751416470.481717875708235
450.4655701338251680.9311402676503350.534429866174832
460.4689422698847580.9378845397695150.531057730115242
470.4806217134469760.9612434268939510.519378286553025
480.4396319082800940.8792638165601880.560368091719906
490.3909196473088810.7818392946177610.60908035269112
500.4202422288118470.8404844576236940.579757771188153
510.3803933460523360.7607866921046720.619606653947664
520.4797900023880650.959580004776130.520209997611935
530.4381480945730440.8762961891460890.561851905426956
540.3876880519777230.7753761039554460.612311948022277
550.5397357626378490.9205284747243030.460264237362151
560.5213046355420080.9573907289159840.478695364457992
570.5055154605246050.988969078950790.494484539475395
580.5150099608565880.9699800782868240.484990039143412
590.4642097655599330.9284195311198670.535790234440066
600.4479548600099650.8959097200199290.552045139990035
610.8483271565203880.3033456869592240.151672843479612
620.8213896681956620.3572206636086760.178610331804338
630.804897442254820.3902051154903610.195102557745181
640.816712151171640.3665756976567210.183287848828361
650.8020658768601830.3958682462796340.197934123139817
660.8261847321492480.3476305357015050.173815267850752
670.7998152937250880.4003694125498230.200184706274912
680.7633165649967740.4733668700064510.236683435003226
690.7254504498119010.5490991003761980.274549550188099
700.6819244422516470.6361511154967050.318075557748353
710.6839982051902940.6320035896194130.316001794809706
720.6596247352575030.6807505294849930.340375264742497
730.6130488430875640.7739023138248710.386951156912436
740.565232454947080.869535090105840.43476754505292
750.5587435743935230.8825128512129540.441256425606477
760.7052633510191250.589473297961750.294736648980875
770.6651454387310630.6697091225378740.334854561268937
780.67010695831070.65978608337860.3298930416893
790.6263616222199870.7472767555600250.373638377780013
800.8504629968319060.2990740063361880.149537003168094
810.8240039209355520.3519921581288960.175996079064448
820.8494142554868030.3011714890263930.150585744513197
830.8695521502265660.2608956995468670.130447849773434
840.923261645909720.1534767081805590.0767383540902793
850.917630375408180.1647392491836390.0823696245918196
860.9029028217280020.1941943565439950.0970971782719977
870.8780011737492250.2439976525015490.121998826250775
880.848870268849610.3022594623007810.151129731150390
890.860812270439350.2783754591213020.139187729560651
900.8446450744172910.3107098511654180.155354925582709
910.8391027601631040.3217944796737920.160897239836896
920.806984265743480.3860314685130410.193015734256521
930.7752666772815680.4494666454368630.224733322718432
940.7328493875107320.5343012249785360.267150612489268
950.6994772953472950.6010454093054110.300522704652705
960.6736276926630290.6527446146739420.326372307336971
970.6426727676266380.7146544647467240.357327232373362
980.8334164830876990.3331670338246020.166583516912301
990.859651761601420.2806964767971610.140348238398581
1000.8336951154463260.3326097691073470.166304884553674
1010.7938345470358770.4123309059282470.206165452964123
1020.7585602808251160.4828794383497680.241439719174884
1030.716782792279860.5664344154402790.283217207720140
1040.7045009909242440.5909980181515110.295499009075756
1050.676649151825580.6467016963488390.323350848174419
1060.7802436784252360.4395126431495280.219756321574764
1070.8131704726819970.3736590546360060.186829527318003
1080.8029275948515410.3941448102969170.197072405148459
1090.7603679884603290.4792640230793430.239632011539671
1100.7260527155669320.5478945688661370.273947284433068
1110.6782234787296960.6435530425406080.321776521270304
1120.6138401726779050.772319654644190.386159827322095
1130.6106147898858450.778770420228310.389385210114155
1140.5417875183700170.9164249632599660.458212481629983
1150.6608656300976320.6782687398047370.339134369902368
1160.7302324797660250.5395350404679490.269767520233975
1170.6775345032806070.6449309934387850.322465496719392
1180.7446420151010510.5107159697978980.255357984898949
1190.7398648851433780.5202702297132440.260135114856622
1200.746611970708440.5067760585831190.253388029291559
1210.9453171357752990.1093657284494030.0546828642247014
1220.9344346858787760.1311306282424480.065565314121224
1230.8916345113767720.2167309772464560.108365488623228
1240.928148910308490.1437021793830220.0718510896915108
1250.882143771646560.2357124567068800.117856228353440
1260.804408668036980.3911826639260410.195591331963020
1270.708764713069560.582470573860880.29123528693044
1280.6809485168310390.6381029663379230.319051483168961
1290.5785529345393920.8428941309212160.421447065460608


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 level10.00819672131147541OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/10md981290353733.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/10md981290353733.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/41csk1290353733.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/41csk1290353733.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/51csk1290353733.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/51csk1290353733.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/61csk1290353733.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290353670wnn84qrk7nj7j93/61csk1290353733.ps (open in new window)


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


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


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