Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.20 KB | None | 0 0
  1.  
  2. R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
  3. Copyright (C) 2017 The R Foundation for Statistical Computing
  4. Platform: x86_64-pc-linux-gnu (64-bit)
  5.  
  6. R is free software and comes with ABSOLUTELY NO WARRANTY.
  7. You are welcome to redistribute it under certain conditions.
  8. Type 'license()' or 'licence()' for distribution details.
  9.  
  10. R is a collaborative project with many contributors.
  11. Type 'contributors()' for more information and
  12. 'citation()' on how to cite R or R packages in publications.
  13.  
  14. Type 'demo()' for some demos, 'help()' for on-line help, or
  15. 'help.start()' for an HTML browser interface to help.
  16. Type 'q()' to quit R.
  17.  
  18. > source('/home/pw/wessanet/cretab')
  19. >
  20. >
  21. >
  22. > myrfcuid = 'account3'
  23. >
  24. > x <- c(1.72923686058208,0.122433126801145,0.523768788982079,-0.50175942601324,-1.86386120887019,0.0717422351702872,-0.380578531491989,-0.29851611788274,1.94316215667028,-1.24779901378139,1.35257277275093,2.84406850014719,1.12274878943606,-2.32540657982629,-2.89902363942181,0.246874012745119,-0.731094375584061,1.97769407549524,-0.089308186457892,-1.64931358279907,1.78988776616251,-0.655026882699021,-0.95518008982139,-0.501427837065876,-1.47468882156665,2.4255103110643,-0.388732570521789,-1.41970373897772,-0.435743764210552,0.588337253253952,-1.73087780677345,0.416192838768035,-0.135602934239543,1.5607508968729,-0.619488852927662,0.130061173484127,-0.485714783249833,1.19042117073251,0.504940688912012,-0.266725732456376,1.8987616014054,0.9835731579105,0.221023228988728,-0.176860990484583,-0.162198287814433,0.78911590880292,1.41209201053576,0.518161844628975,2.36462043434148,-1.24446105804486,1.09138861156198,0.422175612267996,-0.997989397904933,0.754650745534752,-1.44375392644115,0.568632265545353,1.35413305240232,-1.34288885715882,-0.0968579661829751,0.242767533935212,0.255744783559028,-0.243232899636027,0.461607264600104,0.0650797112167817,2.25999343044582,1.80462197944889,2.32548979115297,0.682758803307819,-0.335554613197298,-0.997929583796738,0.97507128242145,-1.17268516900173,-0.000337278483281606,-1.71460596672184,-1.34872342854985,-1.6521456119588,-1.48335049731373,0.925016701443022,-0.226525557050897,0.774905929042345,-0.339789522342372,0.89311055438168,-0.864578780222597,-1.95217915873499,-0.11317194501752,1.02470860347022,-1.25650654087286,-0.602130638597027,-0.83233134657693,-0.446577198612737,-4.01053303468812,0.288513333839785,-1.00798474916531,-0.572816189634855,-0.297410570159231,1.21578539483534,-0.727486991378146,-0.843943364912431,-1.20889338911855,-0.649656515850742,3.19984732249364,0.572738529480399,-0.0199646221520179,0.462316869083462,-1.28699501625665,-1.80757939159691,-2.15431670426712,0.707840316820782,1.36410372036211,0.314718394752158,-4.1002515835693,1.26992188862053,1.80144339707427,-0.42970220964945,0.529993653035631,1.18764422512472,-0.398233352310507,-0.421884162222733,-2.6898323919027,1.0140628812162,-0.542058945797581,-0.368690243263354,1.31411524584048,-0.428705333764204,-0.663582558495647,1.37204511801761,-1.27310996987184,0.810157913937622,1.5741305304336,-1.025150115941,-0.998930862337702,-0.0536208441845616,1.66337771592794,-0.178008462116163,-1.09164775518912,1.96797905166753,0.634220496887586,1.38764487483822,0.75570654001001,-2.3214750727902,1.62023993830839,0.423224828517651,-1.7051130142733,0.541981863740972,-0.593027838089475,0.213567450337977,-0.696840242545287,0.0777251570183703,-0.725328497765991,2.1315776363419,-0.33645518676905,-0.979182554450992,-0.242246084610725,-1.82980075345691,-1.14814874978528,0.496126806273696,-0.37803015357093,0.564631359789787,0.268965939275992,0.752661368724124,-2.30203173253409,2.82635859577673,-0.607627712639158,3.77405193258893,1.08426693162876,-2.2508985634727,0.290663952981133,-1.1346060583543,1.41583984485642,0.590041695581542,1.22056539827692,0.0970995178245223,-0.906020145960084,-0.597681226735446,0.437155726246844,0.742487563055592,1.22917286536281,-0.95259160353182,-0.75528682870179)
  25. > ylimmax = ''
  26. > ylimmin = ''
  27. > main = 'Robustness of Central Tendency'
  28. > #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Thu, 20 Jul 2017 08:33:00 +0200)
  29. > #Author: root
  30. > #To cite this work: Wessa, P., (2017), Central Tendency (v1.0.7) in Free Statistics Software (v$_version), Office for Research Development and Education, URL https://www.wessa.net/rwasp_centraltendency.wasp/
  31. > #Source of accompanying publication: Office for Research, Development, and Education
  32. > #
  33. > geomean <- function(x) {
  34. + return(exp(mean(log(x))))
  35. + }
  36. > harmean <- function(x) {
  37. + return(1/mean(1/x))
  38. + }
  39. > quamean <- function(x) {
  40. + return(sqrt(mean(x*x)))
  41. + }
  42. > winmean <- function(x) {
  43. + x <-sort(x[!is.na(x)])
  44. + n<-length(x)
  45. + denom <- 3
  46. + nodenom <- n/denom
  47. + if (nodenom>40) denom <- n/40
  48. + sqrtn = sqrt(n)
  49. + roundnodenom = floor(nodenom)
  50. + win <- array(NA,dim=c(roundnodenom,2))
  51. + for (j in 1:roundnodenom) {
  52. + win[j,1] <- (j*x[j+1]+sum(x[(j+1):(n-j)])+j*x[n-j])/n
  53. + win[j,2] <- sd(c(rep(x[j+1],j),x[(j+1):(n-j)],rep(x[n-j],j)))/sqrtn
  54. + }
  55. + return(win)
  56. + }
  57. > trimean <- function(x) {
  58. + x <-sort(x[!is.na(x)])
  59. + n<-length(x)
  60. + denom <- 3
  61. + nodenom <- n/denom
  62. + if (nodenom>40) denom <- n/40
  63. + sqrtn = sqrt(n)
  64. + roundnodenom = floor(nodenom)
  65. + tri <- array(NA,dim=c(roundnodenom,2))
  66. + for (j in 1:roundnodenom) {
  67. + tri[j,1] <- mean(x,trim=j/n)
  68. + tri[j,2] <- sd(x[(j+1):(n-j)]) / sqrt(n-j*2)
  69. + }
  70. + return(tri)
  71. + }
  72. > midrange <- function(x) {
  73. + return((max(x)+min(x))/2)
  74. + }
  75. > q1 <- function(data,n,p,i,f) {
  76. + np <- n*p;
  77. + i <<- floor(np)
  78. + f <<- np - i
  79. + qvalue <- (1-f)*data[i] + f*data[i+1]
  80. + }
  81. > q2 <- function(data,n,p,i,f) {
  82. + np <- (n+1)*p
  83. + i <<- floor(np)
  84. + f <<- np - i
  85. + qvalue <- (1-f)*data[i] + f*data[i+1]
  86. + }
  87. > q3 <- function(data,n,p,i,f) {
  88. + np <- n*p
  89. + i <<- floor(np)
  90. + f <<- np - i
  91. + if (f==0) {
  92. + qvalue <- data[i]
  93. + } else {
  94. + qvalue <- data[i+1]
  95. + }
  96. + }
  97. > q4 <- function(data,n,p,i,f) {
  98. + np <- n*p
  99. + i <<- floor(np)
  100. + f <<- np - i
  101. + if (f==0) {
  102. + qvalue <- (data[i]+data[i+1])/2
  103. + } else {
  104. + qvalue <- data[i+1]
  105. + }
  106. + }
  107. > q5 <- function(data,n,p,i,f) {
  108. + np <- (n-1)*p
  109. + i <<- floor(np)
  110. + f <<- np - i
  111. + if (f==0) {
  112. + qvalue <- data[i+1]
  113. + } else {
  114. + qvalue <- data[i+1] + f*(data[i+2]-data[i+1])
  115. + }
  116. + }
  117. > q6 <- function(data,n,p,i,f) {
  118. + np <- n*p+0.5
  119. + i <<- floor(np)
  120. + f <<- np - i
  121. + qvalue <- data[i]
  122. + }
  123. > q7 <- function(data,n,p,i,f) {
  124. + np <- (n+1)*p
  125. + i <<- floor(np)
  126. + f <<- np - i
  127. + if (f==0) {
  128. + qvalue <- data[i]
  129. + } else {
  130. + qvalue <- f*data[i] + (1-f)*data[i+1]
  131. + }
  132. + }
  133. > q8 <- function(data,n,p,i,f) {
  134. + np <- (n+1)*p
  135. + i <<- floor(np)
  136. + f <<- np - i
  137. + if (f==0) {
  138. + qvalue <- data[i]
  139. + } else {
  140. + if (f == 0.5) {
  141. + qvalue <- (data[i]+data[i+1])/2
  142. + } else {
  143. + if (f < 0.5) {
  144. + qvalue <- data[i]
  145. + } else {
  146. + qvalue <- data[i+1]
  147. + }
  148. + }
  149. + }
  150. + }
  151. > midmean <- function(x,def) {
  152. + x <-sort(x[!is.na(x)])
  153. + n<-length(x)
  154. + if (def==1) {
  155. + qvalue1 <- q1(x,n,0.25,i,f)
  156. + qvalue3 <- q1(x,n,0.75,i,f)
  157. + }
  158. + if (def==2) {
  159. + qvalue1 <- q2(x,n,0.25,i,f)
  160. + qvalue3 <- q2(x,n,0.75,i,f)
  161. + }
  162. + if (def==3) {
  163. + qvalue1 <- q3(x,n,0.25,i,f)
  164. + qvalue3 <- q3(x,n,0.75,i,f)
  165. + }
  166. + if (def==4) {
  167. + qvalue1 <- q4(x,n,0.25,i,f)
  168. + qvalue3 <- q4(x,n,0.75,i,f)
  169. + }
  170. + if (def==5) {
  171. + qvalue1 <- q5(x,n,0.25,i,f)
  172. + qvalue3 <- q5(x,n,0.75,i,f)
  173. + }
  174. + if (def==6) {
  175. + qvalue1 <- q6(x,n,0.25,i,f)
  176. + qvalue3 <- q6(x,n,0.75,i,f)
  177. + }
  178. + if (def==7) {
  179. + qvalue1 <- q7(x,n,0.25,i,f)
  180. + qvalue3 <- q7(x,n,0.75,i,f)
  181. + }
  182. + if (def==8) {
  183. + qvalue1 <- q8(x,n,0.25,i,f)
  184. + qvalue3 <- q8(x,n,0.75,i,f)
  185. + }
  186. + midm <- 0
  187. + myn <- 0
  188. + roundno4 <- round(n/4)
  189. + round3no4 <- round(3*n/4)
  190. + for (i in 1:n) {
  191. + if ((x[i]>=qvalue1) & (x[i]<=qvalue3)){
  192. + midm = midm + x[i]
  193. + myn = myn + 1
  194. + }
  195. + }
  196. + midm = midm / myn
  197. + return(midm)
  198. + }
  199. > (arm <- mean(x))
  200. [1] -1.989305e-16
  201. > sqrtn <- sqrt(length(x))
  202. > (armse <- sd(x) / sqrtn)
  203. [1] 0.09684876
  204. > (armose <- arm / armse)
  205. [1] -2.054032e-15
  206. > (geo <- geomean(x))
  207. [1] NaN
  208. Warning message:
  209. In log(x) : NaNs produced
  210. > (har <- harmean(x))
  211. [1] -0.05912054
  212. > (qua <- quamean(x))
  213. [1] 1.292124
  214. > (win <- winmean(x))
  215. [,1] [,2]
  216. [1,] -0.0027066260 0.09607873
  217. [2,] 0.0057372910 0.09281121
  218. [3,] 0.0089464755 0.09216355
  219. [4,] 0.0081325655 0.08944528
  220. [5,] 0.0065415496 0.08917371
  221. [6,] 0.0058816400 0.08888480
  222. [7,] 0.0053199509 0.08822366
  223. [8,] 0.0038972052 0.08680475
  224. [9,] 0.0063233832 0.08439097
  225. [10,] 0.0107146082 0.08368757
  226. [11,] 0.0112826482 0.08322617
  227. [12,] 0.0097957749 0.08265642
  228. [13,] 0.0085293253 0.08111246
  229. [14,] 0.0095533789 0.08092871
  230. [15,] 0.0093805288 0.08071341
  231. [16,] 0.0086937352 0.07948739
  232. [17,] 0.0027079197 0.07870468
  233. [18,] 0.0150590680 0.07628537
  234. [19,] 0.0110841691 0.07561038
  235. [20,] 0.0130456508 0.07505775
  236. [21,] -0.0011335567 0.07283496
  237. [22,] 0.0071296526 0.07184465
  238. [23,] 0.0047380941 0.07142176
  239. [24,] 0.0101406528 0.07040927
  240. [25,] 0.0109707714 0.07008870
  241. [26,] 0.0119341892 0.06968438
  242. [27,] 0.0130122656 0.06952485
  243. [28,] 0.0075187014 0.06882517
  244. [29,] 0.0061212435 0.06748073
  245. [30,] 0.0053602150 0.06615603
  246. [31,] 0.0081188604 0.06557814
  247. [32,] 0.0096853744 0.06525021
  248. [33,] 0.0129289756 0.06399152
  249. [34,] 0.0250323476 0.06273021
  250. [35,] 0.0156996525 0.06110792
  251. [36,] 0.0112134711 0.06029820
  252. [37,] 0.0099359964 0.06013192
  253. [38,] -0.0026949731 0.05887627
  254. [39,] -0.0009298838 0.05826247
  255. [40,] -0.0023795506 0.05709410
  256. [41,] -0.0037340140 0.05684987
  257. [42,] -0.0045512832 0.05470283
  258. [43,] -0.0022606999 0.05305821
  259. [44,] -0.0175789005 0.05069185
  260. [45,] -0.0199495676 0.04994141
  261. [46,] -0.0038021444 0.04782907
  262. [47,] -0.0024911164 0.04681104
  263. [48,] -0.0018068912 0.04670076
  264. [49,] -0.0017605967 0.04659966
  265. [50,] 0.0033551714 0.04565120
  266. [51,] 0.0029592626 0.04394534
  267. [52,] -0.0018415394 0.04308002
  268. [53,] -0.0146231081 0.04167396
  269. [54,] -0.0188499320 0.03974127
  270. [55,] -0.0157291589 0.03938760
  271. [56,] -0.0188894515 0.03882329
  272. [57,] -0.0187801810 0.03859192
  273. [58,] -0.0185687619 0.03835415
  274. [59,] -0.0193722983 0.03715943
  275. > (tri <- trimean(x))
  276. [,1] [,2]
  277. [1,] 1.842936e-03 0.09271751
  278. [2,] 6.496488e-03 0.08905067
  279. [3,] 6.889251e-03 0.08695211
  280. [4,] 6.171429e-03 0.08494387
  281. [5,] 5.652134e-03 0.08360704
  282. [6,] 5.461468e-03 0.08223742
  283. [7,] 5.385498e-03 0.08082553
  284. [8,] 5.395781e-03 0.07943091
  285. [9,] 5.604046e-03 0.07817244
  286. [10,] 5.514066e-03 0.07719288
  287. [11,] 4.921138e-03 0.07623704
  288. [12,] 4.253272e-03 0.07526703
  289. [13,] 3.712908e-03 0.07429135
  290. [14,] 3.273714e-03 0.07342233
  291. [15,] 3.273714e-03 0.07250222
  292. [16,] 2.195365e-03 0.07152871
  293. [17,] 1.693982e-03 0.07060483
  294. [18,] 1.619323e-03 0.06968314
  295. [19,] 6.714454e-04 0.06892409
  296. [20,] -3.430152e-05 0.06816286
  297. [21,] -8.887948e-04 0.06738477
  298. [22,] -8.733406e-04 0.06674221
  299. [23,] -1.362929e-03 0.06612725
  300. [24,] -1.725386e-03 0.06548973
  301. [25,] -2.411439e-03 0.06487765
  302. [26,] -3.165901e-03 0.06423125
  303. [27,] -3.997568e-03 0.06355364
  304. [28,] -4.914388e-03 0.06281953
  305. [29,] -5.571272e-03 0.06207040
  306. [30,] -5.571272e-03 0.06135882
  307. [31,] -6.766155e-03 0.06068423
  308. [32,] -7.513537e-03 0.05998396
  309. [33,] -8.364921e-03 0.05923280
  310. [34,] -9.405491e-03 0.05850525
  311. [35,] -1.106884e-02 0.05779988
  312. [36,] -1.234830e-02 0.05715331
  313. [37,] -1.346405e-02 0.05649803
  314. [38,] -1.456314e-02 0.05577493
  315. [39,] -1.511665e-02 0.05507455
  316. [40,] -1.577437e-02 0.05433838
  317. [41,] -1.639232e-02 0.05361251
  318. [42,] -1.697405e-02 0.05281122
  319. [43,] -1.754335e-02 0.05210417
  320. [44,] -1.824245e-02 0.05145194
  321. [45,] -1.827279e-02 0.05092778
  322. [46,] -1.819612e-02 0.05039116
  323. [47,] -1.885508e-02 0.04996702
  324. [48,] -1.960595e-02 0.04956345
  325. [49,] -2.042540e-02 0.04909451
  326. [50,] -2.128849e-02 0.04854913
  327. [51,] -2.128849e-02 0.04800198
  328. [52,] -2.362261e-02 0.04753310
  329. [53,] -2.464969e-02 0.04706355
  330. [54,] -2.512664e-02 0.04665288
  331. [55,] -2.542818e-02 0.04636271
  332. [56,] -2.589931e-02 0.04603151
  333. [57,] -2.624402e-02 0.04567696
  334. [58,] -2.661607e-02 0.04525326
  335. [59,] -2.702322e-02 0.04474740
  336. > (midr <- midrange(x))
  337. [1] -0.1630998
  338. > midm <- array(NA,dim=8)
  339. > for (j in 1:8) midm[j] <- midmean(x,j)
  340. > midm
  341. [1] -0.02744690 -0.01824245 -0.01824245 -0.01824245 -0.01827279 -0.02744690
  342. [7] -0.01824245 -0.01824245
  343. > postscript(file="/home/pw/wessanet/rcomp/tmp/1hdtg1516786829.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
  344. > lb <- win[,1] - 2*win[,2]
  345. > ub <- win[,1] + 2*win[,2]
  346. > if ((ylimmin == '') | (ylimmax == '')) plot(win[,1],type='b',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(win[,1],type='l',main=main, xlab='j', pch=19, ylab='Winsorized Mean(j/n)', ylim=c(ylimmin,ylimmax))
  347. > lines(ub,lty=3)
  348. > lines(lb,lty=3)
  349. > grid()
  350. > dev.off()
  351. null device
  352. 1
  353. > postscript(file="/home/pw/wessanet/rcomp/tmp/25grc1516786829.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
  354. > lb <- tri[,1] - 2*tri[,2]
  355. > ub <- tri[,1] + 2*tri[,2]
  356. > if ((ylimmin == '') | (ylimmax == '')) plot(tri[,1],type='b',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(min(lb),max(ub))) else plot(tri[,1],type='l',main=main, xlab='j', pch=19, ylab='Trimmed Mean(j/n)', ylim=c(ylimmin,ylimmax))
  357. > lines(ub,lty=3)
  358. > lines(lb,lty=3)
  359. > grid()
  360. > dev.off()
  361. null device
  362. 1
  363. >
  364. > a<-table.start()
  365. > a<-table.row.start(a)
  366. > a<-table.element(a,'Central Tendency - Ungrouped Data',4,TRUE)
  367. > a<-table.row.end(a)
  368. > a<-table.row.start(a)
  369. > a<-table.element(a,'Measure',header=TRUE)
  370. > a<-table.element(a,'Value',header=TRUE)
  371. > a<-table.element(a,'S.E.',header=TRUE)
  372. > a<-table.element(a,'Value/S.E.',header=TRUE)
  373. > a<-table.row.end(a)
  374. > a<-table.row.start(a)
  375. > a<-table.element(a,'Arithmetic Mean',header=TRUE)
  376. > a<-table.element(a,signif(arm,6))
  377. > a<-table.element(a, signif(armse,6))
  378. > a<-table.element(a,signif(armose,6))
  379. > a<-table.row.end(a)
  380. > a<-table.row.start(a)
  381. > a<-table.element(a, 'Geometric Mean',header=TRUE)
  382. > a<-table.element(a,signif(geo,6))
  383. > a<-table.element(a,'')
  384. > a<-table.element(a,'')
  385. > a<-table.row.end(a)
  386. > a<-table.row.start(a)
  387. > a<-table.element(a, 'Harmonic Mean',header=TRUE)
  388. > a<-table.element(a,signif(har,6))
  389. > a<-table.element(a,'')
  390. > a<-table.element(a,'')
  391. > a<-table.row.end(a)
  392. > a<-table.row.start(a)
  393. > a<-table.element(a, 'Quadratic Mean',header=TRUE)
  394. > a<-table.element(a,signif(qua,6))
  395. > a<-table.element(a,'')
  396. > a<-table.element(a,'')
  397. > a<-table.row.end(a)
  398. > for (j in 1:length(win[,1])) {
  399. + a<-table.row.start(a)
  400. + mylabel <- paste('Winsorized Mean (',j)
  401. + mylabel <- paste(mylabel,'/')
  402. + mylabel <- paste(mylabel,length(win[,1]))
  403. + mylabel <- paste(mylabel,')')
  404. + a<-table.element(a, mylabel,header=TRUE)
  405. + a<-table.element(a,signif(win[j,1],6))
  406. + a<-table.element(a,signif(win[j,2],6))
  407. + a<-table.element(a,signif(win[j,1]/win[j,2],6))
  408. + a<-table.row.end(a)
  409. + }
  410. > for (j in 1:length(tri[,1])) {
  411. + a<-table.row.start(a)
  412. + mylabel <- paste('Trimmed Mean (',j)
  413. + mylabel <- paste(mylabel,'/')
  414. + mylabel <- paste(mylabel,length(tri[,1]))
  415. + mylabel <- paste(mylabel,')')
  416. + a<-table.element(a, mylabel,header=TRUE)
  417. + a<-table.element(a,signif(tri[j,1],6))
  418. + a<-table.element(a,signif(tri[j,2],6))
  419. + a<-table.element(a,signif(tri[j,1]/tri[j,2],6))
  420. + a<-table.row.end(a)
  421. + }
  422. > a<-table.row.start(a)
  423. > a<-table.element(a, 'Median',header=TRUE)
  424. > a<-table.element(a,signif(median(x),6))
  425. > a<-table.element(a,'')
  426. > a<-table.element(a,'')
  427. > a<-table.row.end(a)
  428. > a<-table.row.start(a)
  429. > a<-table.element(a, 'Midrange',header=TRUE)
  430. > a<-table.element(a,signif(midr,6))
  431. > a<-table.element(a,'')
  432. > a<-table.element(a,'')
  433. > a<-table.row.end(a)
  434. > a<-table.row.start(a)
  435. > mymid <- 'Midmean'
  436. > mylabel <- paste(mymid,'Weighted Average at Xnp',sep=' - ')
  437. > a<-table.element(a,mylabel,header=TRUE)
  438. > a<-table.element(a,signif(midm[1],6))
  439. > a<-table.element(a,'')
  440. > a<-table.element(a,'')
  441. > a<-table.row.end(a)
  442. > a<-table.row.start(a)
  443. > mymid <- 'Midmean'
  444. > mylabel <- paste(mymid,'Weighted Average at X(n+1)p',sep=' - ')
  445. > a<-table.element(a,mylabel,header=TRUE)
  446. > a<-table.element(a,signif(midm[2],6))
  447. > a<-table.element(a,'')
  448. > a<-table.element(a,'')
  449. > a<-table.row.end(a)
  450. > a<-table.row.start(a)
  451. > mymid <- 'Midmean'
  452. > mylabel <- paste(mymid,'Empirical Distribution Function',sep=' - ')
  453. > a<-table.element(a,mylabel,header=TRUE)
  454. > a<-table.element(a,signif(midm[3],6))
  455. > a<-table.element(a,'')
  456. > a<-table.element(a,'')
  457. > a<-table.row.end(a)
  458. > a<-table.row.start(a)
  459. > mymid <- 'Midmean'
  460. > mylabel <- paste(mymid,'Empirical Distribution Function - Averaging',sep=' - ')
  461. > a<-table.element(a,mylabel,header=TRUE)
  462. > a<-table.element(a,signif(midm[4],6))
  463. > a<-table.element(a,'')
  464. > a<-table.element(a,'')
  465. > a<-table.row.end(a)
  466. > a<-table.row.start(a)
  467. > mymid <- 'Midmean'
  468. > mylabel <- paste(mymid,'Empirical Distribution Function - Interpolation',sep=' - ')
  469. > a<-table.element(a,mylabel,header=TRUE)
  470. > a<-table.element(a,signif(midm[5],6))
  471. > a<-table.element(a,'')
  472. > a<-table.element(a,'')
  473. > a<-table.row.end(a)
  474. > a<-table.row.start(a)
  475. > mymid <- 'Midmean'
  476. > mylabel <- paste(mymid,'Closest Observation',sep=' - ')
  477. > a<-table.element(a,mylabel,header=TRUE)
  478. > a<-table.element(a,signif(midm[6],6))
  479. > a<-table.element(a,'')
  480. > a<-table.element(a,'')
  481. > a<-table.row.end(a)
  482. > a<-table.row.start(a)
  483. > mymid <- 'Midmean'
  484. > mylabel <- paste(mymid,'True Basic - Statistics Graphics Toolkit',sep=' - ')
  485. > a<-table.element(a,mylabel,header=TRUE)
  486. > a<-table.element(a,signif(midm[7],6))
  487. > a<-table.element(a,'')
  488. > a<-table.element(a,'')
  489. > a<-table.row.end(a)
  490. > a<-table.row.start(a)
  491. > mymid <- 'Midmean'
  492. > mylabel <- paste(mymid,'MS Excel (old versions)',sep=' - ')
  493. > a<-table.element(a,mylabel,header=TRUE)
  494. > a<-table.element(a,signif(midm[8],6))
  495. > a<-table.element(a,'')
  496. > a<-table.element(a,'')
  497. > a<-table.row.end(a)
  498. > a<-table.row.start(a)
  499. > a<-table.element(a,'Number of observations',header=TRUE)
  500. > a<-table.element(a,signif(length(x),6))
  501. > a<-table.element(a,'')
  502. > a<-table.element(a,'')
  503. > a<-table.row.end(a)
  504. > a<-table.end(a)
  505. > table.save(a,file="/home/pw/wessanet/rcomp/tmp/3d6i51516786830.tab")
  506. >
  507. > try(system("convert /home/pw/wessanet/rcomp/tmp/1hdtg1516786829.ps /home/pw/wessanet/rcomp/tmp/1hdtg1516786829.png",intern=TRUE))
  508. character(0)
  509. > try(system("convert /home/pw/wessanet/rcomp/tmp/25grc1516786829.ps /home/pw/wessanet/rcomp/tmp/25grc1516786829.png",intern=TRUE))
  510. character(0)
  511. >
  512. > proc.time()
  513. user system elapsed
  514. 2.616 0.320 4.514
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement