Home » date » 2010 » Nov » 24 »

Liniear Trend on - Priems

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 24 Nov 2010 08:24:56 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh.htm/, Retrieved Wed, 24 Nov 2010 09:23:46 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh.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 «
8 3 3 4 4 4 8 4 3 4 3 4 8 4 4 3 4 3 8 3 3 4 3 2 8 2 3 4 4 4 8 5 4 4 4 5 8 3 2 4 3 4 8 2 3 4 4 4 8 2 4 2 3 2 8 4 3 2 4 2 8 3 3 4 3 4 8 3 4 4 4 4 8 4 2 4 3 5 8 4 2 4 3 5 8 2 3 3 4 4 8 3 2 4 3 3 8 4 4 4 4 4 8 2 2 3 3 4 8 2 1 2 3 2 8 3 3 2 4 4 8 4 4 4 4 4 8 2 2 3 3 4 8 2 3 4 3 4 8 3 3 4 4 4 8 4 4 3 4 4 8 4 3 3 4 4 8 3 3 2 4 3 8 3 4 3 4 3 8 4 4 4 4 4 8 2 4 3 2 3 8 3 3 3 4 4 8 4 4 4 4 4 8 2 2 4 3 4 8 4 4 3 4 4 8 4 3 4 4 4 8 2 2 2 3 3 8 3 4 3 4 4 9 4 4 4 4 4 9 4 4 4 3 4 9 3 4 3 4 3 9 4 2 5 3 5 9 3 2 3 3 4 9 3 3 3 3 4 9 3 4 4 3 4 9 3 5 4 4 4 9 2 2 5 2 5 9 4 3 3 3 4 9 4 3 4 4 4 9 3 3 4 4 4 9 3 2 4 3 4 9 3 4 4 4 5 9 3 3 3 4 4 9 2 3 3 4 3 9 4 4 3 5 3 9 4 1 2 4 4 9 4 4 4 4 4 9 3 2 4 3 4 9 4 4 4 3 4 9 3 4 3 3 3 9 4 4 4 4 3 9 3 2 3 3 3 9 3 4 4 4 4 9 3 2 4 3 4 9 3 4 4 3 4 9 4 4 4 3 4 9 1 1 4 1 5 9 4 4 4 4 3 9 4 4 4 4 4 9 3 3 4 4 3 9 5 3 2 4 2 9 3 3 3 4 4 9 3 3 4 4 4 9 3 3 4 3 5 9 4 3 3 3 2 10 4 4 4 3 4 10 3 1 4 3 4 10 3 3 4 4 4 10 4 3 3 4 4 10 2 3 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
SocialVisible[t] = + 1.28655442281463 -0.0116291252388734Tijd[t] + 0.200736343687531ManyFriends[t] + 0.0194771930298669MakeNewFriends[t] + 0.234334548584778QuiteAccepted[t] + 0.111076713012465IntendMakeNewFriends[t] + 0.00371329634067004t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)1.286554422814631.6290280.78980.4309890.215495
Tijd-0.01162912523887340.208366-0.05580.9555710.477786
ManyFriends0.2007363436875310.0735892.72780.0071870.003594
MakeNewFriends0.01947719302986690.097110.20060.8413240.420662
QuiteAccepted0.2343345485847780.0939162.49520.0137430.006872
IntendMakeNewFriends0.1110767130124650.0919741.20770.2291840.114592
t0.003713296340670040.0054290.6840.4951220.247561


Multiple Linear Regression - Regression Statistics
Multiple R0.463319910208726
R-squared0.214665339195822
Adjusted R-squared0.181246842991389
F-TEST (value)6.42354874027353
F-TEST (DF numerator)6
F-TEST (DF denominator)141
p-value5.28252382958616e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.698807226015477
Sum Squared Residuals68.8547470175339


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133.25899756681534-0.25899756681534
243.028376314571240.971623685428758
343.336606597141890.663393402858115
432.813649481227650.186350518772350
523.27385075217803-1.27385075217803
653.589377105218691.41062289478130
732.846206452587060.153793547412941
823.28499064120004-1.28499064120004
922.99399792055880-0.993997920558796
1043.031309421796710.968690578203287
1133.06179598163727-0.0617959816372699
1233.50058017025025-0.500580170250248
1342.979562943643541.02043705635646
1442.983276239984211.01672376001579
1523.29150652255486-1.29150652255486
1632.768549406640620.231450593359376
1743.51914665195360.480853348046401
1822.86757551930456-0.867575519304562
1922.42892185290290-0.428921852902904
2033.29059581122834-0.290595811228344
2143.533999837316280.466000162683721
2222.88242870466724-0.882428704667243
2323.10635553772531-1.10635553772531
2433.34440338265076-0.344403382650758
2543.529375829649090.470624170350908
2643.332352782302230.667647217697769
2733.20551217260057-0.205512172600569
2833.42943900565864-0.429439005658637
2943.563706208041640.436293791958361
3022.96819650117042-0.968196501170422
3133.35091926400558-0.350919264005582
3243.574846097063650.425153902936351
3322.94275215744448-0.94275215744448
3443.562795496715120.437204503284877
3543.385249642398130.614750357601871
3622.80386094739429-0.803860947394291
3733.57393538573713-0.573935385737133
3843.585496749868800.414503250131204
3943.354875497624690.645124502375312
4033.4623694365078-0.462369436507804
4143.09138330897330.908616691026701
4232.945065506241770.0549344937582302
4333.14951514626997-0.149515146269971
4433.37344197932804-0.373441979328039
4533.81222616794102-0.812226167941017
4622.87561524209187-0.875615242091871
4743.164368331632650.835631668367349
4843.421893369587970.578106630412035
4933.42560666592864-0.425606665928635
5032.9942490699970.00575093000300298
5133.74484631530997-0.744846315309972
5233.41726936192078-0.417269361920779
5323.30990594524898-1.30990594524898
5443.748690133861960.251309866138038
5543.007459370537860.99254062946214
5643.652336084000860.347663915999143
5733.02024214438169-0.0202421443816873
5843.425428128097420.574571871902581
5933.29858751839576-0.298587518395757
6043.556112556351070.443887443648929
6132.904541423702040.0954585762979647
6233.67461586204488-0.674615862044877
6333.04252192242571-0.0425219224257076
6433.44770790614144-0.447707906141439
6543.451421202482110.548578797517891
6612.49533308360310-1.49533308360310
6743.582105630735760.417894369264238
6843.69689564008890.303104359911103
6933.38879587972957-0.388795879729571
7053.242478076998041.75752192300196
7133.48782199239351-0.48782199239351
7233.51101248176405-0.511012481764046
7333.3914679425324-0.391467942532404
7443.042473906805810.957526093194189
7543.476925040649940.523074959350064
7632.878429305928010.121570694071986
7733.51794983822852-0.517949838228523
7843.502185941539330.497814058460674
7923.39482252486753-1.39482252486753
8043.241679780738640.758320219261358
8133.40954518801889-0.409545188018891
8222.87929200163463-0.879292001634634
8343.279121804187880.720878195812121
8443.744679256300740.255320743699256
8533.52817901592402-0.528179015924017
8643.641029135969620.358970864030381
8743.535605608605360.464394391394643
8843.759532441663420.240467558336575
8933.74376854497423-0.743768544974228
9033.31241094904259-0.312410949042589
9143.134865094725590.865134905274405
9252.461876879739162.53812312026084
9332.907957138822160.0920428611778425
9443.341385146272650.658614853727351
9543.350454623775810.649545376224194
9643.789238812388780.210761187611215
9743.792952108729450.207047891270545
9853.941340322979841.05865967702016
9943.365307809138490.634692190861514
10032.479402127904670.520597872095328
10143.60706895040460.392931049595396
10243.245893792118160.754106207881836
10343.815231886773470.184768113226525
10443.397995302709220.602004697290784
10543.602444942737420.397555057262582
10633.47560433303576-0.475604333035755
10743.395014179863850.604985820136153
10843.833798368476830.166201631523175
10943.837511664817500.162488335182505
11043.659535546496250.340464453503748
11143.610603708914060.389396291085942
11243.435549741225570.56445025877443
11343.639999381253770.360000618746229
11433.59063727966733-0.590637279667327
11543.413091425350330.586908574649667
11633.61754106537853-0.617541065378534
11733.43463902989905-0.434639029899053
11843.859302206644650.140697793355348
11943.628680954400540.371319045599456
12043.431657907053680.568342092946316
12143.870442095666660.129557904333338
12233.6734190483198-0.673419048319801
12333.54657843861814-0.546578438618139
12412.22366197580448-1.22366197580448
12543.885295281029340.114704718970658
12633.88900857737001-0.889008577370012
12743.491249186335620.508750813664379
12843.695698826363820.304301173636178
12933.90014846639202-0.900148466392023
13043.703125419045160.296874580954838
13143.907575059073360.0924249409266374
13223.50981566803897-1.50981566803897
13344.11573799544223-0.115737995442234
13433.58742469836551-0.58742469836551
13533.90295105140618-0.902951051406176
13643.725405197089180.274594802910818
13743.929854837117380.0701451628826171
13833.73283178977052-0.732831789770522
13933.73654508611119-0.736545086111192
14033.53952203876433-0.539522038764331
14143.944708022480060.055291977519937
14243.948421318820730.0515786811792669
14333.75139827147387-0.751398271473872
14444.19018246008685-0.190182460086851
14533.21267725887044-0.212677258870438
14643.852197791170950.147802208829052
14743.732653251939310.267346748060694
14843.424553491579980.57544650842002


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.998589107887830.002821784224341380.00141089211217069
110.9964838943556130.007032211288773180.00351610564438659
120.992151655722890.01569668855421850.00784834427710927
130.9907959538882550.01840809222349060.0092040461117453
140.9865252423157860.02694951536842710.0134747576842136
150.9918954923736430.01620901525271350.00810450762635674
160.990087879330230.01982424133953970.00991212066976985
170.9910741955448750.017851608910250.008925804455125
180.99251179643260.01497640713480150.00748820356740073
190.9880336461549050.02393270769019000.0119663538450950
200.980916333903080.03816733219384130.0190836660969207
210.9766271990453530.04674560190929300.0233728009546465
220.976851602213510.04629679557298130.0231483977864907
230.9825226534764580.03495469304708340.0174773465235417
240.9745092013651950.05098159726961010.0254907986348051
250.9730408755194530.05391824896109370.0269591244805469
260.9765286926255570.04694261474888530.0234713073744426
270.9667858751398530.06642824972029320.0332141248601466
280.9551195657436140.08976086851277180.0448804342563859
290.94552115885510.1089576822898010.0544788411449007
300.9472683157267840.1054633685464310.0527316842732155
310.9307293742048170.1385412515903650.0692706257951825
320.9180409342091080.1639181315817850.0819590657908925
330.916612407848590.1667751843028180.083387592151409
340.9039175786391190.1921648427217620.096082421360881
350.9001480789603790.1997038420792430.0998519210396215
360.8915429883233640.2169140233532730.108457011676636
370.8814111966236050.2371776067527890.118588803376395
380.8542509969691450.291498006061710.145749003030855
390.8333583770791020.3332832458417960.166641622920898
400.824980385553680.3500392288926390.175019614446319
410.8291625703377360.3416748593245290.170837429662264
420.791731668663480.4165366626730420.208268331336521
430.7547213088762580.4905573822474850.245278691123742
440.7331062894675630.5337874210648740.266893710532437
450.769416057615230.4611678847695390.230583942384769
460.7811026176217140.4377947647565720.218897382378286
470.808656548510770.3826869029784610.191343451489230
480.7895427706748280.4209144586503440.210457229325172
490.7704252114267410.4591495771465180.229574788573259
500.7299511984153770.5400976031692450.270048801584623
510.7499387202805290.5001225594389420.250061279719471
520.723516048034490.5529679039310210.276483951965510
530.8067356691513690.3865286616972630.193264330848632
540.7826007746092560.4347984507814870.217399225390744
550.8132735634853620.3734528730292750.186726436514638
560.7885974162424580.4228051675150840.211402583757542
570.752742158156080.494515683687840.24725784184392
580.7531359169244590.4937281661510820.246864083075541
590.7292433464223470.5415133071553060.270756653577653
600.7075184821886230.5849630356227540.292481517811377
610.673345768966150.6533084620677010.326654231033850
620.6816163676012730.6367672647974540.318383632398727
630.6385925699896130.7228148600207730.361407430010387
640.6185637188897210.7628725622205570.381436281110279
650.605982701337860.788034597324280.39401729866214
660.7687563764813290.4624872470373420.231243623518671
670.7415210439456890.5169579121086220.258478956054311
680.7045461892396390.5909076215207230.295453810760362
690.698692574459560.602614851080880.30130742554044
700.8666508428027140.2666983143945730.133349157197286
710.8703615498625120.2592769002749760.129638450137488
720.8862089043578030.2275821912843930.113791095642197
730.9122391285121930.1755217429756130.0877608714878066
740.918745098231040.1625098035379180.0812549017689592
750.9040362049305360.1919275901389280.0959637950694638
760.883832056662020.232335886675960.11616794333798
770.8913754511741840.2172490976516320.108624548825816
780.873292442729340.2534151145413180.126707557270659
790.9514074494188540.09718510116229120.0485925505811456
800.951288968653520.09742206269296060.0487110313464803
810.955761545624730.08847690875054190.0442384543752710
820.9785898875313510.04282022493729770.0214101124686488
830.9790418601617080.04191627967658320.0209581398382916
840.9721650219937530.05566995601249390.0278349780062470
850.975367229128400.04926554174319780.0246327708715989
860.9675214620729350.06495707585412920.0324785379270646
870.958696527088050.08260694582390220.0413034729119511
880.9473276154913280.1053447690173430.0526723845086715
890.9637408153347680.07251836933046310.0362591846652315
900.966202610317260.06759477936548220.0337973896827411
910.9627390392178870.07452192156422650.0372609607821133
920.9996438401115540.0007123197768920650.000356159888446032
930.999615659970020.0007686800599611310.000384340029980566
940.999592636986020.000814726027961070.000407363013980535
950.9993848400571970.001230319885606920.000615159942803458
960.9990982780437380.001803443912524110.000901721956262056
970.9987246152272960.002550769545408810.00127538477270441
980.9985904204737980.002819159052403850.00140957952620193
990.9978927758593630.004214448281273980.00210722414063699
1000.9969187194885570.006162561022886220.00308128051144311
1010.9953519892929720.009296021414056340.00464801070702817
1020.995482606929660.009034786140680710.00451739307034036
1030.993603209746080.01279358050784060.00639679025392029
1040.9922845781624570.01543084367508610.00771542183754303
1050.9895877216918090.02082455661638280.0104122783081914
1060.9861582562149660.0276834875700690.0138417437850345
1070.9806198704777960.03876025904440780.0193801295222039
1080.973055117263050.05388976547390160.0269448827369508
1090.9648961680004870.07020766399902590.0351038319995129
1100.972140467983920.05571906403216020.0278595320160801
1110.9607609448668610.07847811026627690.0392390551331385
1120.959543357265290.08091328546942120.0404566427347106
1130.9515245484343620.09695090313127530.0484754515656376
1140.9392224262427730.1215551475144540.0607775737572272
1150.9376574811405730.1246850377188540.0623425188594269
1160.9466383409333450.1067233181333110.0533616590666553
1170.9435605005635970.1128789988728050.0564394994364027
1180.922473354363850.1550532912723010.0775266456361507
1190.8979498276504170.2041003446991670.102050172349583
1200.9119936503673920.1760126992652170.0880063496326084
1210.8887842773920610.2224314452158770.111215722607939
1220.867897569388580.2642048612228400.132102430611420
1230.8454738763338320.3090522473323360.154526123666168
1240.870930350109090.2581392997818210.129069649890911
1250.8305162075680330.3389675848639340.169483792431967
1260.8707430081407040.2585139837185930.129256991859296
1270.929256562642390.1414868747152190.0707434373576097
1280.947306965409940.1053860691801210.0526930345900603
1290.9671510472715480.06569790545690470.0328489527284523
1300.9822626465716680.03547470685666330.0177373534283316
1310.974772474057830.05045505188433870.0252275259421694
1320.9840617466496930.03187650670061340.0159382533503067
1330.9804703476349790.0390593047300430.0195296523650215
1340.961852404809810.07629519038038190.0381475951901909
1350.9248475600269670.1503048799460670.0751524399730334
1360.9581615432327460.0836769135345080.041838456767254
1370.9265817584147780.1468364831704440.073418241585222
1380.8397900454170480.3204199091659040.160209954582952


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level130.100775193798450NOK
5% type I error level370.286821705426357NOK
10% type I error level600.465116279069767NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/106ruu1290587086.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/106ruu1290587086.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/1ahf41290587086.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/1ahf41290587086.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/2ahf41290587086.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/2ahf41290587086.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/7dhdr1290587086.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/7dhdr1290587086.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/86ruu1290587086.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/86ruu1290587086.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/96ruu1290587086.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t12905870144o40nxvyldecvsh/96ruu1290587086.ps (open in new window)


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