Home » date » 2010 » Dec » 14 »

*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 16:06:05 +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/t129234265858bwhm4isbm1rgk.htm/, Retrieved Tue, 14 Dec 2010 17:04:19 +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/t129234265858bwhm4isbm1rgk.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 «
0 13 13 14 13 3 0 12 12 8 13 5 1 15 10 12 16 6 1 12 9 7 12 6 1 10 10 10 11 5 1 12 12 7 12 3 0 15 13 16 18 8 1 9 12 11 11 4 0 12 12 14 14 4 0 11 6 6 9 4 1 11 5 16 14 6 0 11 12 11 12 6 0 15 11 16 11 5 1 7 14 12 12 4 0 11 14 7 13 6 1 11 12 13 11 4 1 10 12 11 12 6 0 14 11 15 16 6 0 10 11 7 9 4 0 6 7 9 11 4 0 11 9 7 13 2 0 15 11 14 15 7 0 11 11 15 10 5 0 12 12 7 11 4 1 14 12 15 13 6 1 15 11 17 16 6 0 9 11 15 15 7 1 13 8 14 14 5 1 13 9 14 14 6 1 16 12 8 14 4 1 13 10 8 8 4 0 12 10 14 13 7 1 14 12 14 15 7 1 11 8 8 13 4 0 9 12 11 11 4 0 16 11 16 15 6 1 12 12 10 15 6 0 10 7 8 9 5 1 13 11 14 13 6 1 16 11 16 16 7 1 14 12 13 13 6 1 15 9 5 11 3 1 5 15 8 12 3 0 8 11 10 12 4 0 11 11 8 12 6 1 16 11 13 14 7 1 17 11 15 14 5 1 9 15 6 8 4 1 9 11 12 13 5 1 13 12 16 16 6 1 10 12 5 13 6 0 6 9 15 11 6 1 12 12 12 14 5 1 8 12 8 13 4 1 14 13 13 13 5 1 12 11 14 13 5 0 11 9 12 12 4 0 16 9 16 16 6 1 8 11 10 15 2 0 15 11 15 15 8 1 7 12 8 12 3 0 16 12 16 14 6 1 14 9 19 12 6 1 16 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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Celebrity[t] = + 0.14910336567032 -0.191454250730584Gender[t] + 0.143311716917591Popularity[t] -0.018666060010054FindingFriends[t] + 0.124670081000215KnowingPeople[t] + 0.168144777231389Liked[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.149103365670320.8151070.18290.8551940.427597
Gender-0.1914542507305840.19316-0.99120.3237780.161889
Popularity0.1433117169175910.0420853.40530.0009240.000462
FindingFriends-0.0186660600100540.049828-0.37460.7086710.354336
KnowingPeople0.1246700810002150.034523.61150.000460.00023
Liked0.1681447772313890.0578122.90850.0043950.002197


Multiple Linear Regression - Regression Statistics
Multiple R0.717481957162345
R-squared0.514780358853509
Adjusted R-squared0.492724920619577
F-TEST (value)23.3402915595456
F-TEST (DF numerator)5
F-TEST (DF denominator)110
p-value6.66133814775094e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.01137430658735
Sum Squared Residuals112.516578682754


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
135.70076014347937-2.70076014347937
254.828094000570540.171905999429456
366.10702167630787-0.107021676307870
464.399823071638521.60017692836148
554.300399043562540.699600956437462
634.34382489160836-1.34382489160836
787.077447625471930.92255237452807
844.24442528762505-0.244425287625055
945.74425926380323-1.74425926380322
1043.874859372787290.12514062721271
1165.789495878225860.210504121774141
1264.890647749422211.10935225057779
1355.93776630487231-0.937766304872315
1444.21328459200137-0.21328459200137
1564.522780082632631.47721991736737
1644.78038888346067-0.780388883460668
1764.555881781774041.44411821822596
1866.51050839311145-0.510508393111455
1943.762887436819640.237112563180356
2043.849934525652710.150065474347294
2124.6161103826829-2.6161103826829
2276.361005251797440.638994748202559
2355.07170457897035-0.0717045789703467
2444.36713436510755-0.367134365107550
2565.795953750676650.204046249323351
2666.71170602129889-0.711706021298892
2775.625805031292111.37419496870789
2855.77078097003045-0.770780970030448
2965.752114910020390.247885089979606
3045.37803139474171-1.37803139474171
3143.976559700620710.0234402993792867
3275.613446606591941.38655339340806
3376.007573224139210.992426775860788
3444.56799227296259-0.567992272962586
3544.43587953835564-0.435879538355639
3666.75365713071546-0.753657130715463
3765.222269466303170.77773053369683
3853.962221757860081.03777824213992
3965.54663801276890.453361987231103
4076.730347657216270.269652342783732
4165.546613588676220.453386411323782
4234.41227328315947-1.41227328315947
4333.40931477415527-0.409314774155273
4444.35470857767928-0.354708577679276
4564.535303566431621.46469643356838
4676.020047859752840.979952140247157
4756.41269973867086-1.41269973867087
4843.060642370899650.93935762910035
4954.72405098309810.275949016901897
5066.28174644645344-0.281746446453441
5163.976006073004132.02399392699587
5264.560622891633891.43937710836611
5355.30346485107221-0.303464851072211
5444.0633928821696-0.0633928821695968
5555.52794752866616-0.527947528666164
5655.40332629585131-0.403326295851306
5745.07131601045259-1.07131601045259
5866.95913402796696-0.95913402796696
5924.66768865864286-2.66768865864286
6086.485675332797661.51432466720234
6133.75193638802062-0.751936388020617
6266.56684629347402-0.566846293474019
6366.18248747747628-0.182487477476283
6466.31286271798445-0.312862717984448
6553.845217839885531.15478216011447
6655.7380678394068-0.738067839406802
6765.197873822692490.802126177307513
6854.487136608525950.512863391474053
6965.689925305593810.310074694406190
7021.943741320275320.0562586797246752
7155.83326144660408-0.833261446604079
7255.59475612248921-0.594756122489211
7355.24560336389504-0.245603363895042
7466.02592398790954-0.0259239879095420
7565.364106444591510.635893555408486
7665.700784567572050.299215432427948
7755.38930364933039-0.389303649330393
7855.33465439488125-0.334654394881253
7945.09140796090653-1.09140796090653
8023.19113973187121-1.19113973187121
8143.818720557750990.181279442249015
8265.681919422235740.318080577764263
8366.26116823111102-0.261168231111024
8454.593213901794140.406786098205857
8534.4292506972561-1.4292506972561
8665.139963487329960.860036512670038
8743.912390578133660.0876094218663422
8855.44026984735365-0.440269847353655
8986.312862717984451.68713728201555
9044.51666193051424-0.516661930514242
9165.69570373737980.304296262620206
9265.519776586209270.480223413790729
9376.711681597206210.288318402793786
9466.29272191934515-0.292721919345147
9554.861171275619270.138828724380729
9644.20518101227258-0.205181012272584
9763.849497108949592.15050289105041
9833.41562240946516-0.41562240946516
9955.65230231342666-0.652302313426656
10065.345415960488780.654584039511219
10176.855017738216480.144982261783517
10276.610320989705190.389679010294807
10366.84868567881392-0.848685678813918
10434.34810416067242-1.34810416067242
10522.52436347882431-0.524363478824312
10685.658371617359692.34162838264031
10734.61804696210794-1.61804696210794
10886.342363615880061.65763638411993
10934.70966419215211-1.70966419215211
11044.61768281768286-0.61768281768286
11155.19748525417473-0.197485254174728
11275.583994556881681.41600544311832
11364.368657951922151.63134204807785
11465.8829031431390.117096856861003
11576.069689556287760.930310443712238
11666.14471794075306-0.144717940753059


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.7507541367589330.4984917264821330.249245863241067
100.6200960736680.7598078526640.379903926332
110.721694803208330.5566103935833390.278305196791669
120.834973444615230.3300531107695420.165026555384771
130.926227713135150.1475445737297010.0737722868648506
140.8845964264822310.2308071470355380.115403573517769
150.888311122879070.2233777542418580.111688877120929
160.8453194419877040.3093611160245910.154680558012296
170.8857145358235580.2285709283528830.114285464176442
180.845630317460480.3087393650790390.154369682539520
190.79264640402520.4147071919495990.207353595974800
200.763188403599580.4736231928008390.236811596400420
210.9726578899392670.05468422012146580.0273421100607329
220.9704228172485680.05915436550286320.0295771827514316
230.9606741644035170.07865167119296540.0393258355964827
240.9444453522485330.1111092955029340.0555546477514668
250.9240473802039220.1519052395921550.0759526197960777
260.9065411149119150.1869177701761690.0934588850880845
270.919360633482360.1612787330352790.0806393665176393
280.904475177175120.1910496456497590.0955248228248794
290.8763804732413510.2472390535172980.123619526758649
300.8824561608367490.2350876783265020.117543839163251
310.8563121782049980.2873756435900030.143687821795002
320.886488122582370.2270237548352610.113511877417631
330.8871073888731180.2257852222537640.112892611126882
340.8680017136315640.2639965727368710.131998286368436
350.8409244418025180.3181511163949630.159075558197482
360.8134505653592840.3730988692814320.186549434640716
370.7891316145615820.4217367708768370.210868385438418
380.790666453371510.418667093256980.20933354662849
390.7566360260609110.4867279478781780.243363973939089
400.7157310827374750.5685378345250490.284268917262525
410.6781137410170660.6437725179658680.321886258982934
420.7106304196453210.5787391607093580.289369580354679
430.6886508753396060.6226982493207870.311349124660394
440.6459229254364860.7081541491270280.354077074563514
450.6989114892950410.6021770214099170.301088510704959
460.70040712937860.59918574124280.2995928706214
470.7361847024892120.5276305950215770.263815297510788
480.727026717063430.5459465658731410.272973282936571
490.6829412178412190.6341175643175620.317058782158781
500.6346392750631010.7307214498737980.365360724936899
510.7525352990303880.4949294019392240.247464700969612
520.8046682862093090.3906634275813820.195331713790691
530.7684563051403870.4630873897192260.231543694859613
540.7335815684917690.5328368630164620.266418431508231
550.6982884323977860.6034231352044280.301711567602214
560.6548297511083880.6903404977832230.345170248891612
570.6606587658322560.6786824683354880.339341234167744
580.6599669738039260.6800660523921470.340033026196074
590.8893559614219880.2212880771560250.110644038578012
600.9187727597097220.1624544805805560.081227240290278
610.907054161238560.1858916775228800.0929458387614402
620.8916170026098630.2167659947802750.108382997390138
630.8646555495371220.2706889009257560.135344450462878
640.8406419152529990.3187161694940030.159358084747001
650.8499478397236580.3001043205526840.150052160276342
660.8392338259841090.3215323480317820.160766174015891
670.8299470012104820.3401059975790350.170052998789518
680.7986529584510850.402694083097830.201347041548915
690.7594257850172520.4811484299654960.240574214982748
700.7284649801885740.5430700396228530.271535019811426
710.7243660893944570.5512678212110850.275633910605543
720.6958332393535450.608333521292910.304166760646455
730.6459362423376710.7081275153246580.354063757662329
740.590058763351540.819882473296920.40994123664846
750.5509484018957920.8981031962084150.449051598104208
760.497899088008780.995798176017560.50210091199122
770.4455774941232470.8911549882464950.554422505876753
780.3962463577278270.7924927154556550.603753642272173
790.4427468043695750.885493608739150.557253195630425
800.4402574322825320.8805148645650650.559742567717468
810.3961092509614980.7922185019229960.603890749038502
820.3396243502546550.679248700509310.660375649745345
830.2932508966030890.5865017932061770.706749103396912
840.2510565762143050.5021131524286110.748943423785695
850.4327890933424240.8655781866848480.567210906657576
860.4143568408646010.8287136817292010.5856431591354
870.3538481829818170.7076963659636340.646151817018183
880.3369523915363920.6739047830727840.663047608463608
890.359469310542030.718938621084060.64053068945797
900.3092330467095590.6184660934191190.690766953290441
910.2707855911439050.541571182287810.729214408856095
920.2804219371957490.5608438743914990.719578062804251
930.2254665828850490.4509331657700970.774533417114951
940.1834219693945060.3668439387890130.816578030605493
950.1387938633667310.2775877267334620.861206136633269
960.1011726296920490.2023452593840980.898827370307951
970.2295322537154930.4590645074309870.770467746284507
980.1831652769394280.3663305538788570.816834723060572
990.1365949769916050.2731899539832090.863405023008396
1000.1008073988818430.2016147977636870.899192601118157
1010.07446361201105350.1489272240221070.925536387988947
1020.04718898901846880.09437797803693770.952811010981531
1030.05761391192241710.1152278238448340.942386088077583
1040.096743806578750.19348761315750.90325619342125
1050.06284029118014440.1256805823602890.937159708819856
1060.1078181238222670.2156362476445340.892181876177733
1070.08049952857749890.1609990571549980.919500471422501


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 level40.0404040404040404OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/10n09u1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/10n09u1292342755.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/1hzci1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/1hzci1292342755.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/2r8tl1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/2r8tl1292342755.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/52iao1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/52iao1292342755.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/62iao1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/62iao1292342755.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/7v9rr1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/7v9rr1292342755.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/8v9rr1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/8v9rr1292342755.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/9n09u1292342755.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t129234265858bwhm4isbm1rgk/9n09u1292342755.ps (open in new window)


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