Home » date » 2010 » Dec » 14 »

multiple regression - belonging

*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: Tue, 14 Dec 2010 08:31:57 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h.htm/, Retrieved Tue, 14 Dec 2010 09:30:37 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h.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 «
13 15 9 42 12 12 18 9 51 15 15 11 9 42 14 12 16 8 46 10 10 12 14 41 10 12 17 14 49 9 15 15 15 47 18 9 19 11 33 11 11 18 8 47 12 11 10 14 42 11 11 14 9 32 15 15 18 6 53 17 7 18 14 41 14 11 14 8 41 24 11 14 11 33 7 10 12 16 37 18 14 16 11 43 11 6 13 13 33 14 11 16 7 49 18 15 14 9 42 12 11 9 15 43 11 12 9 16 37 5 14 17 10 43 12 15 13 14 42 11 9 15 12 43 10 13 17 6 46 11 13 16 4 33 15 16 12 12 42 16 13 11 14 40 14 12 16 13 44 8 14 17 9 42 13 11 17 14 52 18 9 16 14 44 17 16 13 10 45 10 12 12 14 46 13 10 12 8 36 11 13 16 8 45 12 16 14 10 49 12 14 12 9 43 12 15 12 9 43 9 5 14 11 37 18 8 8 15 32 7 11 15 9 45 14 16 14 9 45 16 17 11 10 45 12 9 13 8 45 17 9 14 8 31 12 13 15 14 33 9 10 16 10 44 12 6 10 11 49 9 12 11 9 44 13 8 12 12 41 10 14 14 13 44 10 12 15 14 38 11 11 16 15 33 13 16 9 11 47 13 8 11 9 37 13 15 15 8 48 6 7 15 7 40 7 16 13 10 50 13 14 17 10 54 21 16 17 10 43 11 9 15 9 54 9 14 13 13 44 18 11 15 11 47 9 13 13 8 33 9 15 15 10 45 15 5 10 14 33 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
belonging[t] = + 30.412552707353 + 0.616533594321869popularity[t] + 0.510913274781838hapiness[t] -0.430298147948814doubsaboutactions[t] + 0.226540094212896parentalexpectations[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)30.4125527073535.9311195.12761e-060
popularity0.6165335943218690.192933.19560.001730.000865
hapiness0.5109132747818380.2605151.96120.0518730.025936
doubsaboutactions-0.4302981479488140.223642-1.9240.0564070.028203
parentalexpectations0.2265400942128960.168011.34840.1797480.089874


Multiple Linear Regression - Regression Statistics
Multiple R0.407575041565467
R-squared0.166117414507092
Adjusted R-squared0.14194690478266
F-TEST (value)6.87273112569805
F-TEST (DF numerator)4
F-TEST (DF denominator)138
p-value4.48569440201219e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation6.81522948809898
Sum Squared Residuals6409.73471061264


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14244.9369863542805-2.93698635428054
25146.53281286694264.46718713305736
34244.5794806322225-2.57948063222247
44644.80858399426331.19141600573670
54138.95007481879932.04992518120068
64942.51116828713946.48883171286065
74744.94750522050852.05249477949147
83343.4273686860097-10.4273686860097
94745.66695713793091.33304286206911
104238.77132195777043.22867804222959
113243.8726261734934-11.8726261734934
125350.12638828218052.87361171781952
134141.0721140613763-0.0721140613763252
144146.3417851693583-5.34178516935829
153341.1997091238926-8.19970912389262
163739.9017992766049-2.90179927660486
174344.9772968332735-1.97729683327349
183338.3313122410941-5.33131224109408
194946.43466930159342.56533069840660
204245.6591402681422-3.6591402681422
214337.83011053503985.16988946496025
223736.65710541613540.342894583864567
234346.1450483502170-3.14504835021703
244242.7701961594034-0.770196159403397
254340.72687734472062.27312265527941
264647.0231672534775-1.02316725347753
273348.2790106514449-15.2790106514449
284244.8691132459055-2.86911324590554
294041.1949227038347-1.19492270383467
304442.20401306609341.79598693390657
314246.8018865923787-4.80188659237874
325243.93349554073358.06650445926646
334441.96297498309512.03702501690493
344544.88138225130760.118617748692373
354640.86276229008175.13723770991826
363641.7584038007051-5.7584038007051
374545.8781977770110-0.878197777010954
384945.84537571451533.15462428548474
394344.0207801242567-1.02078012425666
404343.9576934359398-0.957693435939837
413739.9924485943033-2.99244859430326
423234.5634361004407-2.56343610044072
434544.15699935406240.843000645937645
444547.1818342393157-2.18183423931565
454544.92916948449160.0708305155083902
464543.01202404644241.98797595355756
473142.3902368501598-11.3902368501598
483342.1058753318975-9.10587533189754
494443.16800069814770.83199930185228
504936.526468241581712.4735317584183
514442.5033397550441.49666024495603
524138.57760392605322.42239607394679
534442.86833389359931.13166610640072
543841.9424219260015-3.94242192600147
553341.8595836469384-8.85958364693841
564743.08705128687013.91294871312985
573740.0372053777565-3.0372053777565
584845.24111112559552.75888887440452
594040.9656806131822-0.965680613182238
605045.56100253394634.43899746605369
615448.18390919813315.8160908018669
624347.1515754446479-4.15157544464788
635441.791231694354112.2087683056459
644444.1697413725206-0.169741372520612
654742.16370258710024.83629741289975
663343.6658376700268-10.6658376700268
674546.4193756776139-1.41937567761391
683334.6190402034134-1.6190402034134
694445.0829171528135-1.08291715281352
704744.44885511997542.55114488002456
714541.14491231842073.85508768157934
724342.44807576766920.551924232330809
734337.2210595260625.77894047393797
743343.6833602773896-10.6833602773896
754643.23331636984792.76668363015209
764743.51290313035893.48709686964110
774742.03832484566064.96167515433936
78041.522157968918-41.522157968918
794343.3867239225719-0.386723922571923
804643.41955181622102.58044818377904
813638.1700994808881-2.17009948088806
824239.34006248775492.65993751224505
834442.74518513554301.25481486445695
844747.0131272314588-0.0131272314588052
854140.27122805731350.728771942686462
864744.08164949149682.91835050850321
874644.53951026882721.46048973117281
884746.86720226407890.132797735921066
894646.7690586987297-0.769058698729703
904645.18104905585610.81895094414394
913644.776563398115-8.77656339811497
923039.8667423995724-9.86674239957245
934843.07990298597064.92009701402945
944541.55242842589253.44757157410751
954945.18630848897023.81369151102983
965546.89746105874678.10253894125329
971142.0305196381786-31.0305196381786
985245.55129096521886.4487090347812
993336.2801765566226-3.28017655662258
1004748.1961782035352-1.19617820353519
1013338.7213115723564-5.72131157235639
1024444.0010343646638-0.00103436466376364
1034239.62221251609392.37778748390614
1045542.226783444263712.7732165557363
1054243.7039191656366-1.70391916563656
1064644.76126394298211.23873605701787
1074646.6862204196666-0.68622041966665
1084746.60035169087290.399648309127147
1093342.8758164789434-9.87581647894343
1105349.4642964380583.53570356194200
1114242.9914768205022-0.991476820502178
1124443.45985646406080.540143535939195
1135545.91850825600419.08149174399586
1144035.73118761738434.26881238261573
1154646.3562889892971-0.356288989297095
1165345.51098631737907.48901368262104
1174445.3194972690451-1.31949726904513
1183539.9618555151909-4.96185551519093
1194039.00344993838860.996550061611378
1204444.8112801595495-0.811280159549488
1214646.1017074214931-0.101707421493107
1224542.00328546208832.99671453791174
1235344.62983113323448.37016886676562
1244544.72844188048640.271558119513565
1254842.06556485290445.93443514709564
1264645.59908402955610.400915970443874
1275541.137423901923213.8625760980768
1284749.6001813834191-2.60018138341915
1294341.81624271821451.18375728178551
1303838.5850923425507-0.585092342550694
1314040.9131069599403-0.913106959940305
1324741.57743361859955.4225663814005
1334741.43150282006635.56849717993371
1344241.6155092830560.384490716944030
1355343.37175875188369.62824124811636
1364344.9772968332735-1.97729683327349
1374444.4160330574797-0.416033057479743
1384242.689575201417-0.68957520141703
1395144.0435679958876.95643200411302
1405442.244311882779911.7556881172201
1414143.0598229419331-2.05982294193311
1425143.6864023894277.31359761057296
1435143.95546445255657.04453554744353


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.5974406207144780.8051187585710440.402559379285522
90.4757280754706470.9514561509412930.524271924529353
100.3628644863459420.7257289726918830.637135513654058
110.3533979896485640.7067959792971270.646602010351436
120.287054945517770.574109891035540.71294505448223
130.2625355862351710.5250711724703420.737464413764829
140.2050084341920430.4100168683840850.794991565807957
150.2328270083417270.4656540166834540.767172991658273
160.1690067938769590.3380135877539170.830993206123041
170.1376930726527270.2753861453054550.862306927347273
180.09668121503111280.1933624300622260.903318784968887
190.1002761664450540.2005523328901090.899723833554946
200.077399604007750.15479920801550.92260039599225
210.08335030923079990.1667006184616000.9166496907692
220.0562932150134950.112586430026990.943706784986505
230.04323241412865420.08646482825730830.956767585871346
240.03082939511752970.06165879023505940.96917060488247
250.02466561430870320.04933122861740630.975334385691297
260.01599876885513550.03199753771027090.984001231144864
270.04515270929703990.09030541859407990.95484729070296
280.03411032896414780.06822065792829560.965889671035852
290.02309876996023230.04619753992046460.976901230039768
300.01531093321071590.03062186642143180.984689066789284
310.01180239221707760.02360478443415530.988197607782922
320.01300858837316600.02601717674633210.986991411626834
330.008521492559930750.01704298511986150.99147850744007
340.00557072031376540.01114144062753080.994429279686235
350.004818622532669610.009637245065339220.99518137746733
360.003254693514349690.006509387028699370.99674530648565
370.002125294123684230.004250588247368460.997874705876316
380.001549016340822130.003098032681644260.998450983659178
390.0009888714115429030.001977742823085810.999011128588457
400.0006046413120482330.001209282624096470.999395358687952
410.0003745254139360760.0007490508278721520.999625474586064
420.0002163792580196460.0004327585160392930.99978362074198
430.0001531668640953420.0003063337281906840.999846833135905
448.96631314683946e-050.0001793262629367890.999910336868532
455.01279095161707e-050.0001002558190323410.999949872090484
466.1385710442343e-050.0001227714208846860.999938614289558
470.0001064086724107460.0002128173448214920.99989359132759
480.0003623866257192560.0007247732514385110.99963761337428
490.0002456195248456230.0004912390496912450.999754380475154
500.003069583800639520.006139167601279050.99693041619936
510.002251224361727970.004502448723455940.997748775638272
520.001606147812149240.003212295624298470.99839385218785
530.001040398832066460.002080797664132920.998959601167934
540.0008341408421249230.001668281684249850.999165859157875
550.001463122346830710.002926244693661430.99853687765317
560.001122182103640440.002244364207280870.99887781789636
570.0007618537909772010.001523707581954400.999238146209023
580.0006033127802293070.001206625560458610.99939668721977
590.0003993300261002660.0007986600522005330.9996006699739
600.0003313648642124170.0006627297284248330.999668635135788
610.0003458082112899950.000691616422579990.99965419178871
620.0002530789346637120.0005061578693274240.999746921065336
630.001183994451944120.002367988903888240.998816005548056
640.0007695008032475290.001539001606495060.999230499196752
650.0006587170491968010.001317434098393600.999341282950803
660.001239655064166880.002479310128333770.998760344935833
670.0008259396698070510.001651879339614100.999174060330193
680.0005531756054606680.001106351210921340.99944682439454
690.0003560272264523970.0007120544529047930.999643972773548
700.0002479773253110450.0004959546506220890.999752022674689
710.000177878549682410.000355757099364820.999822121450318
720.0001108316215025110.0002216632430050220.999889168378498
739.55563696450313e-050.0001911127392900630.999904443630355
740.0001934193718448670.0003868387436897340.999806580628155
750.0001334215557734190.0002668431115468390.999866578444227
769.3171584665127e-050.0001863431693302540.999906828415335
778.30506922662771e-050.0001661013845325540.999916949307734
780.8928294389362450.2143411221275090.107170561063755
790.8680658848367990.2638682303264030.131934115163201
800.8432994725895710.3134010548208570.156700527410429
810.825922703012370.3481545939752590.174077296987629
820.7969297092098970.4061405815802060.203070290790103
830.7608389710066440.4783220579867110.239161028993356
840.7216377131641580.5567245736716840.278362286835842
850.678473981701230.6430520365975410.321526018298770
860.6559919715323850.688016056935230.344008028467615
870.633070412442070.7338591751158610.366929587557930
880.5847996479104570.8304007041790870.415200352089543
890.5424417550208130.9151164899583740.457558244979187
900.518478963431440.963042073137120.48152103656856
910.5844295036315930.8311409927368150.415570496368407
920.655289676818030.6894206463639390.344710323181969
930.6406659239955630.7186681520088730.359334076004437
940.6117958964572930.7764082070854150.388204103542707
950.5706080036093610.8587839927812780.429391996390639
960.5804746120499450.839050775900110.419525387950055
970.9989016528248940.002196694350213040.00109834717510652
980.998538392990370.002923214019258040.00146160700962902
990.9989332832456630.002133433508674610.00106671675433731
1000.9987763894963030.002447221007394920.00122361050369746
1010.999181526347530.001636947304940030.000818473652470016
1020.9986498144213030.00270037115739450.00135018557869725
1030.9980146103033340.003970779393331990.00198538969666600
1040.998931669493030.002136661013938920.00106833050696946
1050.9989026752804190.00219464943916190.00109732471958095
1060.9981775253191840.003644949361630950.00182247468081548
1070.9972958273997320.005408345200536180.00270417260026809
1080.995829804525480.008340390949040150.00417019547452008
1090.9980889341754280.003822131649144410.00191106582457220
1100.9969682155837280.006063568832543670.00303178441627184
1110.9955947597136680.008810480572663820.00440524028633191
1120.9937998620602180.0124002758795630.0062001379397815
1130.99376561498910.01246877002179790.00623438501089893
1140.9906913887487250.01861722250254970.00930861125127484
1150.9861487774660780.02770244506784330.0138512225339217
1160.9827396869351380.03452062612972330.0172603130648616
1170.9858605013913980.02827899721720350.0141394986086017
1180.986337461208220.0273250775835610.0136625387917805
1190.989297968553110.02140406289378100.0107020314468905
1200.9823392382525730.03532152349485350.0176607617474268
1210.97928485873040.04143028253919960.0207151412695998
1220.9692654194030.06146916119399890.0307345805969994
1230.9663074419553810.06738511608923850.0336925580446193
1240.9488822214273970.1022355571452060.051117778572603
1250.9248601962612820.1502796074774370.0751398037387184
1260.8907472546532480.2185054906935040.109252745346752
1270.9124324635545670.1751350728908670.0875675364454334
1280.9070292265128450.1859415469743100.0929707734871552
1290.9002506777977740.1994986444044510.0997493222022257
1300.8651570925361180.2696858149277640.134842907463882
1310.937667971891880.1246640562162400.0623320281081202
1320.8889478508022380.2221042983955250.111052149197762
1330.8130605038100840.3738789923798310.186939496189916
1340.6876723933679320.6246552132641360.312327606632068
1350.5321058408668520.9357883182662960.467894159133148


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level580.453125NOK
5% type I error level760.59375NOK
10% type I error level820.640625NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/10vvs51292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/10vvs51292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/16cvb1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/16cvb1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/26cvb1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/26cvb1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/3z3uw1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/3z3uw1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/4z3uw1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/4z3uw1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/5z3uw1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/5z3uw1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/6sdtz1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/6sdtz1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/73mak1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/73mak1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/83mak1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/83mak1292315507.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/93mak1292315507.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292315427bo5zzm4gi7xs63h/93mak1292315507.ps (open in new window)


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