Home » date » 2010 » Dec » 19 »

Paper Multiple Regression zonder outliers

*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, 19 Dec 2010 13:54:47 +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/19/t1292767015jk0kkucaf1837v5.htm/, Retrieved Sun, 19 Dec 2010 14:57:07 +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/19/t1292767015jk0kkucaf1837v5.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 «
41 25 15 9 3 38 25 15 9 4 37 19 14 9 4 42 18 10 8 4 40 23 18 15 3 43 25 14 9 4 40 23 11 11 4 45 30 17 6 5 45 32 21 10 4 44 25 7 11 4 42 26 18 16 4 41 35 18 7 4 38 20 12 10 4 38 21 9 9 4 46 17 11 6 5 42 27 16 12 4 46 25 12 10 4 43 18 14 14 5 38 22 13 9 4 39 23 17 14 4 40 25 13 14 3 37 19 13 9 2 41 20 12 8 4 46 26 12 10 4 37 22 9 9 3 39 25 17 9 4 44 29 18 11 5 38 22 12 10 2 38 32 12 8 0 38 23 9 14 4 33 18 13 10 3 43 26 11 14 4 41 14 13 15 2 45 25 11 10 5 38 23 15 10 4 39 24 11 11 4 40 21 14 10 4 36 17 12 16 2 49 29 8 6 5 41 25 11 11 4 42 25 17 14 3 41 25 16 9 5 43 21 13 11 4 46 23 15 8 3 41 25 16 8 5 39 25 7 11 4 42 24 16 16 4 35 21 13 12 5 36 22 15 14 3 41 20 12 10 4 41 22 15 10 3 36 28 18 12 4 46 25 17 9 4 44 21 15 8 4 43 27 11 16 2 40 19 12 13 5 40 20 14 8 3 39 22 10 8 4 44 26 11 7 4 38 17 12 11 2 39 15 6 6 4 41 27 15 9 5 39 25 14 14 3 40 19 16 12 4 44 18 16 8 4 42 15 11 8 4 46 29 15 12 5 44 24 12 13 4 37 24 13 11 4 39 22 14 12 2 40 22 12 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
StudyForCareer[t] = + 32.354703179194 + 0.252477610175875PersonalStandards[t] -0.106985446432251ParentalExpectations[t] -0.141013216016659Doubts[t] + 1.4793123811832LeaderPreference[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.3547031791942.20538614.670800
PersonalStandards0.2524776101758750.0729853.45930.0007490.000374
ParentalExpectations-0.1069854464322510.093164-1.14840.2530860.126543
Doubts-0.1410132160166590.104376-1.3510.1792120.089606
LeaderPreference1.47931238118320.3243854.56041.2e-056e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.544667585985645
R-squared0.29666277922343
Adjusted R-squared0.273411962007676
F-TEST (value)12.7592409535789
F-TEST (DF numerator)4
F-TEST (DF denominator)121
p-value1.07389912518130e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.16129589508423
Sum Squared Residuals1209.24880008944


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14140.23067993650660.769320063493367
23841.70999231769-3.70999231768996
33740.302112103067-3.30211210306696
44240.61858949463681.38141050536325
54038.55868908075831.44131091924170
64341.81697776412221.18302223587779
74041.3509524510339-1.35095245103390
84544.6607615049380.339238495061987
94542.69440969431092.30559030568908
104442.28384945711461.71615054288535
114240.65442107645251.34557892354753
124144.1958385121853-3.19583851218528
133840.6275473900907-2.62754739009068
143841.3419945555800-3.34199455557997
154642.02046525124513.97953474875486
164241.68492244355950.315077556440519
174641.88993544097014.11006455902995
184340.8238807939912.17611920600901
193841.1665303800268-3.16653038002684
203940.2860001243904-1.28600012439041
214039.7395847492880.260415250712035
223737.4504727871328-0.450472787132813
234140.9095738221240.0904261778760015
244642.14241305114593.85758694885407
253740.1151597845726-3.11515978457264
263941.4960214248255-2.49602142482546
274443.59623236824660.403767631753411
283838.173877848076-0.173877848076030
293838.0220556195017-0.0220556195016989
303841.1418836958484-3.14188369584842
313338.5362943421235-5.53629434212348
324341.68534563351151.31465436648846
334135.34200544015355.65799455984652
344543.47623326858551.52376673141450
353841.0640238813216-3.06402388132155
363941.6034300612098-2.60343006120977
374040.6660541074021-0.666054107402053
383636.0654105010967-0.0654105010966984
394945.37115291265243.62884708734761
404141.8559076713856-0.855907671385645
414239.3116429635592.68835703644104
424143.0823192524409-2.08231925244091
434340.63202633781762.36797366218236
444639.86673793217176.13326206782833
454143.2233324684576-2.22333246845757
463942.2838494571146-3.28384945711465
474240.36343674896521.63656325103478
483541.9703255029842-6.97032550298418
493638.7681810258958-2.76818102589584
504140.62754739009070.372452609909321
514139.33223388996251.66776611003752
523641.7234291608709-5.72342916087085
534641.49602142482554.50397857517454
544440.84109509300313.15890490699688
554338.69717204928774.3028279507123
564041.431342513048-1.43134251304803
574039.21629054807630.783709451923703
583941.6284999353403-2.62849993534025
594442.67243814562821.32756185437184
603836.770476581181.22952341882000
613940.5711248818714-1.57112488187145
624143.6942599192249-2.69425991922491
633939.6325993028557-0.632599302855715
644039.66510156215250.334898437847518
654439.97667681604324.02332318395675
664239.75417121767692.24582878232313
674643.77617549152672.22382450847332
684441.21441818274422.7855818172558
693741.3894591683453-4.38945916834527
703937.67788052317821.32211947682179
714039.23015058120930.769849418790749
724239.3116429635592.68835703644104
733739.6487112815323-2.64871128153227
743338.0964412235012-5.09644122350122
753540.725574941069-5.725574941069
764235.28515974198226.71484025801781
773636.8138854361704-0.813885436170394
784441.14188369584842.85811630415158
794541.18039041315983.81960958684021
804743.41418218743133.58581781256871
814041.3505292610818-1.35052926108184
824843.62983694787894.37016305212106
834542.83026483221712.16973516778291
844141.0210382162832-0.0210382162832137
853438.6837352061068-4.68373520610680
863838.3291742871777-0.329174287177704
873738.8277018595628-1.82770185956279
884844.39932599930823.60067400069179
893942.3563839440104-3.35638394401043
903440.9364475084858-6.93644750848579
913536.6590121870208-1.65901218702078
924140.9496060497230.0503939502769873
934339.5016936075013.498306392499
944138.78429300457242.21570699542761
953937.75126138997811.24873861002189
963640.8796018103145-4.8796018103145
974641.31692468144954.68307531855051
984241.77847104681080.221528953189161
994237.20737626236294.79262373763707
1004540.61115710947054.38884289052954
1013941.5304723843619-2.53047238436193
1024542.82731139477782.17268860522223
1034843.71975298330754.28024701669255
1043538.1693989003491-3.16939890034907
1053839.8199748113021-1.81997481130210
1064239.14713268857192.8528673114281
1073638.9731940233064-2.97319402330641
1083741.521514488908-4.521514488908
1093839.3187970467816-1.31879704678158
1104340.86348983163792.13651016836206
1113536.4342546431108-1.43425464311081
1123640.5935196205063-4.59351962050627
1133335.8331006273723-2.83310062737228
1143939.0240352634631-0.0240352634630974
1154539.68273905111675.31726094888333
1163540.4820552263471-5.48205522634706
1173838.5707453016599-0.570745301659948
1183638.759646320394-2.75964632039397
1194238.39080217837993.60919782162015
1204139.98605790144921.01394209855077
1213538.5792800071618-3.57928000716182
1224338.69116759127314.30883240872691
1234042.3747229248703-2.37472292487035
1244641.63297888306724.36702111693279
1254442.83026483221711.16973516778290
1263538.929785168316-3.92978516831601


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.5450090475489610.9099819049020780.454990952451039
90.4124825173479630.8249650346959260.587517482652037
100.2775860305424540.5551720610849080.722413969457546
110.1769837239507770.3539674479015550.823016276049223
120.2470529379154100.4941058758308210.75294706208459
130.2065613372686090.4131226745372180.793438662731391
140.1869154589330430.3738309178660860.813084541066957
150.3202081587177850.640416317435570.679791841282215
160.2378103001022470.4756206002044930.762189699897754
170.3115388946978740.6230777893957480.688461105302126
180.2407945786558210.4815891573116420.759205421344179
190.2382481195928360.4764962391856720.761751880407164
200.2040486818472400.4080973636944810.79595131815276
210.1523234165404370.3046468330808740.847676583459563
220.1193719490723770.2387438981447540.880628050927623
230.08482841210122320.1696568242024460.915171587898777
240.1040872981427130.2081745962854260.895912701857287
250.09570731780903070.1914146356180610.904292682190969
260.08264263553748070.1652852710749610.91735736446252
270.05894920461260650.1178984092252130.941050795387393
280.04363743758763310.08727487517526620.956362562412367
290.03410076048834150.0682015209766830.965899239511658
300.04292797644855920.08585595289711840.95707202355144
310.0757643905188560.1515287810377120.924235609481144
320.05642397276051510.1128479455210300.943576027239485
330.1296949225400840.2593898450801670.870305077459916
340.1068330909159950.2136661818319910.893166909084005
350.1044976882892310.2089953765784620.895502311710769
360.09721227961894080.1944245592378820.902787720381059
370.07372550549807390.1474510109961480.926274494501926
380.05554166777812680.1110833355562540.944458332221873
390.0674341661684980.1348683323369960.932565833831502
400.05191685819539490.1038337163907900.948083141804605
410.04743362780871590.09486725561743190.952566372191284
420.03913680912880630.07827361825761270.960863190871194
430.03498702585706520.06997405171413040.965012974142935
440.0964094205779550.192818841155910.903590579422045
450.08321319414196780.1664263882839360.916786805858032
460.08673386343346040.1734677268669210.91326613656654
470.07006672538813240.1401334507762650.929933274611868
480.174048072957430.348096145914860.82595192704257
490.1684567501894950.336913500378990.831543249810505
500.1374446509841680.2748893019683350.862555349015832
510.1171556270430690.2343112540861380.882844372956931
520.1894588697366870.3789177394733740.810541130263313
530.2305476897838960.4610953795677920.769452310216104
540.2286141236112890.4572282472225780.771385876388711
550.2626666889674790.5253333779349580.737333311032521
560.2303037900051920.4606075800103830.769696209994808
570.1938691021174620.3877382042349240.806130897882538
580.1816955168885410.3633910337770810.81830448311146
590.1553376895932200.3106753791864390.84466231040678
600.1300921626446380.2601843252892770.869907837355361
610.1122490906023270.2244981812046540.887750909397673
620.1056036192569990.2112072385139980.894396380743
630.08453733631369940.1690746726273990.9154626636863
640.06601076325179470.1320215265035890.933989236748205
650.0750303219147320.1500606438294640.924969678085268
660.06436454663465690.1287290932693140.935635453365343
670.05783693616215630.1156738723243130.942163063837844
680.0545344915326170.1090689830652340.945465508467383
690.06903213330147940.1380642666029590.93096786669852
700.05740715251464930.1148143050292990.94259284748535
710.04462411428971880.08924822857943760.955375885710281
720.04424584451080590.08849168902161180.955754155489194
730.04069593353428150.08139186706856310.959304066465718
740.0596297000127710.1192594000255420.94037029998723
750.11812112705640.23624225411280.8818788729436
760.2444258658723360.4888517317446730.755574134127664
770.2084017895298890.4168035790597780.79159821047011
780.1980646381102560.3961292762205130.801935361889744
790.2139444815750310.4278889631500610.78605551842497
800.2207622498017940.4415244996035870.779237750198206
810.1872154776571880.3744309553143760.812784522342812
820.2773457080489210.5546914160978420.722654291951079
830.2468275754264290.4936551508528570.753172424573571
840.2052838243526810.4105676487053630.794716175647318
850.2456143054450080.4912286108900170.754385694554992
860.2052440183852460.4104880367704910.794755981614754
870.1799885947377920.3599771894755840.820011405262208
880.1937031625785810.3874063251571630.806296837421419
890.2075676388410080.4151352776820160.792432361158992
900.2936726637470950.587345327494190.706327336252905
910.2528679864150920.5057359728301850.747132013584908
920.2077393906121720.4154787812243430.792260609387828
930.2077062865833070.4154125731666150.792293713416693
940.1889940010310270.3779880020620530.811005998968973
950.1526050007638040.3052100015276080.847394999236196
960.1744341505021020.3488683010042030.825565849497898
970.2050984812477860.4101969624955730.794901518752213
980.1625733694735360.3251467389470720.837426630526464
990.236768306164470.473536612328940.76323169383553
1000.2672587436079070.5345174872158130.732741256392093
1010.2462742234064060.4925484468128130.753725776593594
1020.2125754183428300.4251508366856590.78742458165717
1030.227341919521110.454683839042220.77265808047889
1040.1952182754146680.3904365508293350.804781724585332
1050.1587122512817270.3174245025634550.841287748718272
1060.1681321003248810.3362642006497620.831867899675119
1070.1450602545424990.2901205090849980.854939745457501
1080.1764141789076080.3528283578152160.823585821092392
1090.1364161491974580.2728322983949160.863583850802542
1100.1085585812408950.2171171624817900.891441418759105
1110.0744719248321970.1489438496643940.925528075167803
1120.0971492875222240.1942985750444480.902850712477776
1130.07278564726642780.1455712945328560.927214352733572
1140.05383835171543840.1076767034308770.946161648284562
1150.06517974486357840.1303594897271570.934820255136422
1160.1694922731025540.3389845462051080.830507726897446
1170.1144058174921830.2288116349843660.885594182507817
1180.2923886292587230.5847772585174450.707611370741277


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 level90.0810810810810811OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/105x961292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/105x961292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/1yecc1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/1yecc1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/2yecc1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/2yecc1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/39nbx1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/39nbx1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/49nbx1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/49nbx1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/59nbx1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/59nbx1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/62ebi1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/62ebi1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/7uosl1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/7uosl1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/8uosl1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/8uosl1292766875.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/9uosl1292766875.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292767015jk0kkucaf1837v5/9uosl1292766875.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