Home » date » 2010 » Nov » 21 »

Meervoudige regressie Happiness 2

*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 14:47:58 +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/t1290351422b77egf5t3hcjfaq.htm/, Retrieved Sun, 21 Nov 2010 15:57:05 +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/t1290351422b77egf5t3hcjfaq.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 15 11 6 4 16 9 20 63 12 26 5 4 24 12 16 73 15 26 20 10 22 15 10 76 12 15 12 6 21 17 8 90 14 10 11 5 23 14 14 67 8 21 12 8 23 9 19 69 11 27 11 9 21 11 23 54 4 21 13 8 22 13 9 54 13 21 9 11 20 16 12 76 19 22 14 6 12 16 14 75 10 29 12 8 23 15 13 76 15 29 18 11 23 10 11 80 6 29 9 5 30 16 11 89 7 30 15 10 22 12 10 73 14 19 12 7 21 15 12 74 16 19 12 7 21 13 18 78 16 22 12 13 15 18 12 76 14 18 15 10 22 13 10 69 15 28 11 8 24 17 15 74 14 17 13 6 23 14 15 82 12 18 10 8 15 13 12 77 9 20 17 7 24 13 9 84 12 16 13 5 24 15 11 75 14 17 17 9 21 15 16 79 14 25 15 11 21 13 17 79 10 22 13 11 18 13 11 88 16 31 17 9 19 16 13 57 10 38 21 7 29 14 9 69 8 18 12 6 20 18 11 86 12 20 15 6 24 9 20 66 8 23 8 5 27 16 8 54 13 12 15 4 28 16 12 85 11 20 16 10 24 17 10 79 12 15 9 8 29 13 11 84 16 21 13 6 24 17 13 70 16 20 11 4 25 15 13 54 13 30 9 9 14 14 13 70 14 22 15 10 22 10 15 54 5 33 9 6 24 13 12 69 14 25 15 9 24 11 13 68 13 20 14 10 24 11 14 66 15 21 14 13 21 15 9 67 11 16 12 8 21 15 9 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'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 18.471365186477 -0.371850791919597Depression[t] + 0.0345840445486369Belonging[t] -0.055174226725832Popularity[t] -0.044863835273013ConcernOverMistakes[t] + 0.111652445263202ParentalExpectations[t] -0.0792229760776518ParentalCriticism[t] -0.0548112247843105Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)18.4713651864772.2037098.381900
Depression-0.3718507919195970.058378-6.369700
Belonging0.03458404454863690.0171752.01360.0461310.023066
Popularity-0.0551742267258320.06232-0.88530.3776230.188811
ConcernOverMistakes-0.0448638352730130.032106-1.39740.1646980.082349
ParentalExpectations0.1116524452632020.061771.80760.0730060.036503
ParentalCriticism-0.07922297607765180.078443-1.00990.3144110.157206
Organization-0.05481122478431050.04683-1.17040.2439880.121994


Multiple Linear Regression - Regression Statistics
Multiple R0.589629676961936
R-squared0.347663155954237
Adjusted R-squared0.312265032633924
F-TEST (value)9.8215137793685
F-TEST (DF numerator)7
F-TEST (DF denominator)129
p-value8.89102680368126e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.96609240890953
Sum Squared Residuals498.651997487945


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11515.5707562793551-0.570756279355079
2910.3104946440228-1.31049464402285
31213.2872868490608-1.28728684906084
41515.7596521693943-0.759652169394276
51716.95944918107360.0405508189263842
61413.64443809431950.355561905680517
7911.338393560231-2.33839356023097
81110.23534896486170.764651035138326
91314.3700357514864-1.3700357514864
101615.03229006514840.967709934851635
111613.45185131507282.54814868492719
121514.01466076125810.985339238741861
131014.4800538394313-4.48005383943129
141615.40356176783560.596438232164388
151215.286873265127-3.286873265127
161514.46740727238480.532592727615223
171312.09357668548270.906423314517342
181814.73426483297913.26573516702093
191314.3342792470557-1.33427924705572
201713.63318399239593.36681600760409
211413.92042747729320.079572522706769
221315.3063437098016-2.30634370980158
231316.3897532294179-3.38975322941788
241515.4737345070114-0.473734507011405
251513.01215520074221.98784479925784
261312.93672160537150.0632783946285424
271315.2945073884385-2.29450738843846
281613.55264242240042.44735757759957
291416.030331275342-2.03033127534201
301815.67984630803272.32015369196734
31910.8608358757501-1.86083587575015
321615.93164676671140.0683532332886011
331615.12334623924280.87665376075715
341714.93151121682082.06848878317921
351315.1218125862326-2.12181258623264
361713.81912805083013.18087194916987
371512.96617136721212.03382863278794
381413.97545443267560.0245455673244031
391012.2188287717503-2.21882877175033
401314.1477302007365-1.14773020073655
411113.8299133460184-2.82991334601836
421113.1604469223968-2.16044692239679
431515.6721109996737-0.672110999673656
441515.4522148076881-0.452214807688086
451212.7666518496131-0.766651849613136
461715.02573191550931.97426808449065
471513.53654046942181.46345953057819
481615.34712964103260.652870358967448
491413.83619170744150.163808292558475
501714.77082325747822.22917674252177
511010.1667732862057-0.166773286205738
521114.3742513001651-3.37425130016508
531513.96502136526331.03497863473669
541514.87395629563620.126043704363799
55710.8213126923863-3.82131269238629
561715.02044410007451.97955589992549
571412.58999548533581.41000451466421
581816.21215830931091.78784169068912
591413.80223960660410.197760393395936
601415.1021069058429-1.1021069058429
61915.5227535945348-6.52275359453481
621414.4643505477734-0.464350547773396
631112.4456382773282-1.44563827732819
641613.80249341840122.19750658159875
651715.23011812121981.7698818787802
661215.2717598774344-3.27175987743435
671513.76233776548471.23766223451528
681515.3076249728366-0.30762497283657
691616.18366555304-0.183665553040031
701616.3694197038323-0.369419703832316
711112.7190564215049-1.71905642150492
721212.8950548880976-0.8950548880976
731414.109227977714-0.109227977713956
741515.6425332638628-0.642533263862847
751715.41050091884131.58949908115866
761914.7115729186694.288427081331
771513.94361802947791.05638197052208
781613.21262807462092.78737192537908
791414.4413997796972-0.441399779697186
801611.31682747917384.68317252082618
811514.74546059855790.254539401442148
821714.62906507098152.37093492901845
831214.2089367767596-2.20893677675965
841814.87765491689483.12234508310518
851314.4011155726877-1.40111557268766
861412.86064838478111.13935161521892
871414.0491281612205-0.0491281612205215
881413.95193789203340.0480621079665583
891214.1331993767643-2.13319937676426
901412.94743949710821.05256050289177
911213.6058479814505-1.60584798145048
921514.51510705085310.484892949146905
931112.3297013138244-1.3297013138244
941515.1267383115133-0.12673831151334
951414.2524491044696-0.252449104469553
961513.71325967460071.28674032539932
971614.40066076856081.59933923143919
981411.30829836282792.69170163717206
991816.06539768372921.93460231627078
1001415.1794376843252-1.17943768432516
1011312.45638513035470.543614869645329
1021412.72520320248071.27479679751933
1031414.5040805009936-0.504080500993641
1041715.4611914675731.53880853242703
1051212.9555294479144-0.955529447914446
1061613.63002802354762.36997197645239
1071012.3794950924766-2.37949509247661
1081314.4168279574073-1.41682795740732
1091515.1445316493511-0.144531649351138
1101615.28597587772110.714024122278923
1111413.03530685144080.96469314855916
1121312.69521726760470.30478273239527
1131714.959026858862.04097314113998
1141413.89790203631150.102097963688514
1151613.46684990875462.53315009124543
1161214.099801047829-2.09980104782901
1171613.50779021441442.49220978558559
118810.5537521962536-2.55375219625362
119912.507835916133-3.50783591613298
1201312.37074298195610.629257018043905
1211915.35539629241653.64460370758352
1221112.5044640495103-1.50446404951033
1231514.9470359878390.0529640121609898
1241113.773210223737-2.77321022373699
1251516.0277814283964-1.0277814283964
1261615.81962780467920.18037219532082
1271512.89761488303322.10238511696677
1281212.8995675520869-0.899567552086856
1291614.89337947164691.10662052835308
1301513.42834496523341.57165503476662
1311314.6943120567262-1.69431205672624
1321414.2004979440111-0.200497944011147
1331112.9876136044835-1.98761360448346
1341514.50030075594470.499699244055297
1351412.77274288838511.22725711161494
1361315.9077684621914-2.90776846219141
1371515.8460007999241-0.84600079992406


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.2679063050879920.5358126101759840.732093694912008
120.2212447758046940.4424895516093880.778755224195306
130.73084671268370.53830657463260.2691532873163
140.6192638023953070.7614723952093860.380736197604693
150.6576396069452990.6847207861094020.342360393054701
160.602241143951020.795517712097960.39775885604898
170.5203630994158670.9592738011682660.479636900584133
180.6465988626537340.7068022746925330.353401137346266
190.5662885379479370.8674229241041270.433711462052063
200.6844091443825550.631181711234890.315590855617445
210.6130168035021640.7739663929956720.386983196497836
220.6513691889985890.6972616220028220.348630811001411
230.7095346931583850.580930613683230.290465306841615
240.6515423210185050.696915357962990.348457678981495
250.6045583513474330.7908832973051350.395441648652567
260.5497544198313050.900491160337390.450245580168695
270.5460529324728360.9078941350543280.453947067527164
280.6582522624379620.6834954751240760.341747737562038
290.6182867684047710.7634264631904570.381713231595229
300.6648345206614140.6703309586771720.335165479338586
310.634895073809490.7302098523810190.365104926190509
320.5722799281899670.8554401436200660.427720071810033
330.5144269876266730.9711460247466540.485573012373327
340.5363789750336840.9272420499326330.463621024966316
350.5398320665886010.9203358668227990.460167933411399
360.6427393054326470.7145213891347060.357260694567353
370.6894099222527190.6211801554945630.310590077747281
380.6420959365949810.7158081268100380.357904063405019
390.6223726223644350.755254755271130.377627377635565
400.5963234367691280.8073531264617440.403676563230872
410.6787928087670490.6424143824659020.321207191232951
420.7053800145119170.5892399709761660.294619985488083
430.6578027253073960.6843945493852080.342197274692604
440.6054952866328690.7890094267342610.394504713367131
450.56237727878660.87524544242680.4376227212134
460.5809809050030550.838038189993890.419019094996945
470.5830280881415740.8339438237168520.416971911858426
480.5482856960367450.903428607926510.451714303963255
490.4944606832988630.9889213665977260.505539316701137
500.5141292820170020.9717414359659960.485870717982998
510.4686593603512720.9373187207025450.531340639648728
520.5462879264675760.9074241470648480.453712073532424
530.5090443062442290.981911387511540.49095569375577
540.4561959802124320.9123919604248640.543804019787568
550.6057617589626160.7884764820747680.394238241037384
560.598911774457510.802176451084980.40108822554249
570.5853469244094660.8293061511810670.414653075590533
580.5832033353525530.8335933292948940.416796664647447
590.533412176943130.9331756461137390.466587823056869
600.500821692654350.99835661469130.49917830734565
610.8900560617705770.2198878764588450.109943938229423
620.8660918444776670.2678163110446660.133908155522333
630.8502962735402940.2994074529194130.149703726459706
640.8563563465421240.2872873069157520.143643653457876
650.8504870171564920.2990259656870170.149512982843508
660.9035135100332480.1929729799335030.0964864899667516
670.8878728487520040.2242543024959910.112127151247995
680.8624152844498760.2751694311002470.137584715550124
690.832754371728420.334491256543160.16724562827158
700.8027562235042560.3944875529914880.197243776495744
710.8000089541965110.3999820916069780.199991045803489
720.768278454312290.463443091375420.23172154568771
730.7268837898419480.5462324203161030.273116210158052
740.6958878673155510.6082242653688990.304112132684449
750.678654651570350.64269069685930.32134534842965
760.82152322506560.3569535498687980.178476774934399
770.7976845178248460.4046309643503090.202315482175154
780.8525413767686850.294917246462630.147458623231315
790.8221410552370190.3557178895259620.177858944762981
800.9574407111207140.0851185777585720.042559288879286
810.9441613817812430.1116772364375130.0558386182187565
820.9495653988935660.1008692022128680.050434601106434
830.9524435286391130.09511294272177370.0475564713608868
840.9731692382321610.05366152353567730.0268307617678386
850.9679857764281560.06402844714368820.0320142235718441
860.9598187612387250.08036247752255080.0401812387612754
870.946346382605150.1073072347897010.0536536173948504
880.9307282543496490.1385434913007020.0692717456503512
890.9340184078181880.1319631843636250.0659815921818124
900.9203448383256370.1593103233487260.0796551616743628
910.9235960190223850.152807961955230.076403980977615
920.906178814610780.1876423707784410.0938211853892204
930.8896554282311020.2206891435377970.110344571768898
940.860055686229360.2798886275412790.139944313770639
950.8278860839010780.3442278321978430.172113916098922
960.8047397781811510.3905204436376970.195260221818848
970.8092308102767440.3815383794465120.190769189723256
980.8441036433130960.3117927133738070.155896356686904
990.87628841911570.2474231617685990.123711580884299
1000.8464170020657550.307165995868490.153582997934245
1010.8183921509421880.3632156981156240.181607849057812
1020.7976828167373230.4046343665253550.202317183262677
1030.7521204769587670.4957590460824670.247879523041233
1040.7325683751978450.534863249604310.267431624802155
1050.6909852451347090.6180295097305830.309014754865291
1060.8105670792894470.3788658414211060.189432920710553
1070.8091645993377580.3816708013244840.190835400662242
1080.7770834543419870.4458330913160260.222916545658013
1090.7262649126044410.5474701747911180.273735087395559
1100.6658326861199820.6683346277600360.334167313880018
1110.6098226803000120.7803546393999760.390177319699988
1120.54388378594330.91223242811340.4561162140567
1130.5397370754034390.9205258491931220.460262924596561
1140.4618606134613280.9237212269226570.538139386538672
1150.5736007876846250.852798424630750.426399212315375
1160.6613642367785150.677271526442970.338635763221485
1170.6110357371321920.7779285257356150.388964262867808
1180.7055261062858140.5889477874283710.294473893714186
1190.8369649534626180.3260700930747630.163035046537382
1200.7875068245523780.4249863508952430.212493175447622
1210.865788258484550.2684234830308980.134211741515449
1220.8325771137448460.3348457725103080.167422886255154
1230.7386163038923790.5227673922152410.261383696107621
1240.902549472911380.1949010541772390.0974505270886195
1250.8208562186468430.3582875627063140.179143781353157
1260.819081406336840.361837187326320.18091859366316


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level50.0431034482758621OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/105it11290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/105it11290350865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/198et1290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/198et1290350865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/298et1290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/298et1290350865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/398et1290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/398et1290350865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/42zdv1290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/42zdv1290350865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/52zdv1290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/52zdv1290350865.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/62zdv1290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/62zdv1290350865.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/85it11290350865.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/21/t1290351422b77egf5t3hcjfaq/85it11290350865.ps (open in new window)


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