options(warn = -1)
library(readxl)

source('functions.R')
## Loading required package: survival
Sys.setlocale(category = "LC_ALL", locale = "Hebrew")
## [1] "LC_COLLATE=Hebrew_Israel.1255;LC_CTYPE=Hebrew_Israel.1255;LC_MONETARY=Hebrew_Israel.1255;LC_NUMERIC=C;LC_TIME=Hebrew_Israel.1255"
a18 <- read.csv("~/1R/Otzma/Otzma 2018 results.csv", stringsAsFactors=FALSE)
a17 <- read.csv("~/1R/Otzma/Otzma 2017 results.csv", stringsAsFactors=FALSE)
a18$call_date=as.Date.character(a18$call_date,"%d-%m-%y") # only for 2018
a18$start_date=as.Date.character(a18$start_date,"%d-%m-%y") # only for 2018
a18$finish_date=as.Date.character(a18$finish_date,"%d-%m-%y") # only for 2018
#a17$call_date=as.Date.character(a17$call_date) # only for 2017 option 2
#a17$start_date=as.Date.character(a17$start_date) # only for 2017 option 2
#a17$finish_date=as.Date.character(a17$finish_date,"%d/%m/%y") # only for 2017 option 2
a17$call_date=as.Date.character(a17$call_date,"%d-%m-%y") # only for 2017
a17$start_date=as.Date.character(a17$start_date,"%d-%m-%y") # only for 2017
a17$finish_date=as.Date.character(a17$finish_date,"%d-%m-%y") # only for 2017

au0 <- a17[,c(3,5:19)] # for 2017
au0 = rbind(au0,a18[,c(3,5:19)]) # add 2018

au1=au0[au0$machine=="eagle" | au0$machine=="matrix",]
au1=au1[order(au1$start_date),]
au1=au1[!is.na(au1$responsibility),]
au1$responsibility=as.factor(au1$responsibility)

fn="dt cnc results 2017&2018 17-17-2018.txt" 
origin=as.numeric(as.Date.character(c("2012-01-01","2014-01-01","2018-01-01")))

f=file(description = fn, open = "wt", encoding = "UTF-8")
o.ix=1
for (x in c("0","1","2")) {
  m1=au1[au1$machine_ix==x,]
  m1=data.frame(m1,dt=rep(0,length(m1[[1]])), ttr=rep(0,length(m1[[1]])))
  sum1=summary(m1$responsibility)
  for (i in 1:length(sum1)) {
    t1=names(sum1[i])
    m_=m1[m1$responsibility==t1,]
    n=length(m_$machine)
    if (n<3) next
    m = build_dt1(m_)
    t<-"delta-T Fit "
    t=paste(t,m$machine[1],m$machine_ix[1],t1)
    print(t)
    write(t, f)
    write(paste("TTFF,",(as.numeric(m$dt[1])-origin[o.ix])),f)
    m$dt[1]=1
    #m=m[2:length(m[[1]]),]
    n=length(m$machine)
    e=NULL
    if (n>3) {
      e=compare_discrete(m,paste("Discrete",t))
    } 
    if (n>2) {
      e=rbind(e,compare_conti(m,paste("Continuous",t)) )
      #e=compare_conti(m,paste("Continuous",t))
    }
    if (!is.null(e)) write.csv(e[order(e[,1], e[,2]),], f)
    if (n>3) {
      e=fit_dt(m,t)
      write(paste("MEAN,",e$mean),f)
      write(paste("SD,",e$sd),f)
      write(paste("SKEWNESS,",e$skewness),f)
      write(paste("KUROSIS,",e$kurtosis),f)
    }
  }
  o.ix=o.ix+1
}
## [1] "delta-T Fit  eagle 0 בקרות"
## [1] "Discrete delta-T Fit  eagle 0 בקרות"
## [1] "P-L GoF: 0.158802176534259"
## [1] "P-L xmin: 3"
## [1] "P-L pars: 1.65"

## [1] "L-N GoF: 0.158233429750904"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 1.99708424701571" "L-N pars: 1.59005761188005"
## [1] "LogNormal fit: 2.16661722121041 - -31.5034270882966"
## [2] "LogNormal fit: 1.42243847052944 - -31.5034270882966"
## [1] "Exponential fit: 0.0427807486631016 - -33.213336601398"
## [1] "Poisson GoF: 0.440612536384657"
## [1] "Poisson xmin: 11"
## [1] "Poisson pars: 54.999999985892"
## [1] "Exp GoF: 0.341814269156538"
## [1] "Exp xmin: 11"
## [1] "Exp pars: 0.0224876872264454"
## [1] "Continuous delta-T Fit  eagle 0 בקרות"
## [1] "P-L GoF: 0.174794828320758"
## [1] "P-L xmin: 3"
## [1] "P-L pars: 1.73"

## [1] "L-N GoF: 0.147222379583443"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 2.34496275442313" "L-N pars: 1.36776180220464"
## [1] "Weibull GoF: 0.142191735875766"
## [1] "Weibull xmin: 1"
## [1] "Weibull pars: 0.582085155548289" "Weibull pars: 13.7993311269272" 
## [1] "Exp GoF: 0.235270211411272"
## [1] "Exp xmin: 5"
## [1] "Exp pars: 0.03"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  93 
## median:  7 
## mean:  23.375 
## estimated sd:  34.33423 
## estimated skewness:  1.660196 
## estimated kurtosis:  4.57583 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.7107695  0.1887856
## scale 18.2015478  9.6192886
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 2.166617  0.5029079
## sdlog   1.422438  0.3556088
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## rate 0.04278075 0.01511701

## Goodness-of-fit statistics
##                              1-mle-weibull 2-mle-lnorm 3-mle-exp
## Kolmogorov-Smirnov statistic    0.24702899  0.18541958 0.3746347
## Cramer-von Mises statistic      0.08383831  0.04899857 0.2707628
## Anderson-Darling statistic      0.47633204  0.31740827 1.4496867
## 
## Goodness-of-fit criteria
##                                1-mle-weibull 2-mle-lnorm 3-mle-exp
## Akaike's Information Criterion      68.48549    67.00685  68.42667
## Bayesian Information Criterion      68.64437    67.16574  68.50611
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##    0.05402980    0.18151573    0.03652897 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.2470290     0.1854196     0.3746347 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##      68.48549      67.00685      68.42667 
## [1] "delta-T Fit  eagle 0 חשמל"
## [1] "Discrete delta-T Fit  eagle 0 חשמל"
## [1] "P-L GoF: 0.21471904564231"
## [1] "P-L xmin: 41"
## [1] "P-L pars: 5"

## [1] "L-N GoF: 0.159516704555357"
## [1] "L-n xmin: 3"
## [1] "L-N pars: 3.25487555636251"  "L-N pars: 0.825602887311944"
## [1] "LogNormal fit: 2.75811444756571 - -58.6502515285956"
## [2] "LogNormal fit: 1.3972483372091 - -58.6502515285956" 
## [1] "Exponential fit: 0.0357142857142857 - -56.3186586322776"
## [1] "Poisson GoF: 0.269676677723024"
## [1] "Poisson xmin: 27"
## [1] "Poisson pars: 43.6622663160881"
## [1] "Exp GoF: 0.153504967014784"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.0363768103752839"
## [1] "Continuous delta-T Fit  eagle 0 חשמל"
## [1] "P-L GoF: 0.150297176793947"
## [1] "P-L xmin: 41"
## [1] "P-L pars: 5"

## [1] "L-N GoF: 0.132005863603725"
## [1] "L-n xmin: 18"
## [1] "L-N pars: 3.63373086278193"  "L-N pars: 0.368692007313411"
## [1] "Weibull GoF: 0.103576557988707"
## [1] "Weibull xmin: 3"
## [1] "Weibull pars: 2.55166680502029" "Weibull pars: 40.5454089669106"
## [1] "Exp GoF: 0.185690699942103"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.04"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  59 
## median:  27 
## mean:  28 
## estimated sd:  20.57507 
## estimated skewness:  0.1229292 
## estimated kurtosis:  1.736485 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## shape  1.104797  0.2678071
## scale 28.850591  7.5417802
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 2.758114  0.3875270
## sdlog   1.397248  0.2740223
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate  Std. Error
## rate 0.03571429 0.009897588

## Goodness-of-fit statistics
##                              1-mle-weibull 2-mle-lnorm 3-mle-exp
## Kolmogorov-Smirnov statistic    0.15570626   0.2352787 0.1665197
## Cramer-von Mises statistic      0.09317085   0.1869702 0.1084923
## Anderson-Darling statistic      0.72958025   1.1152857 0.6977440
## 
## Goodness-of-fit criteria
##                                1-mle-weibull 2-mle-lnorm 3-mle-exp
## Akaike's Information Criterion      116.4745    121.3005  114.6373
## Bayesian Information Criterion      117.6044    122.4304  115.2023
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##    0.02018012    0.06523841    0.16263694 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.1557063     0.2352787     0.1665197 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##      116.4745      121.3005      114.6373 
## [1] "delta-T Fit  eagle 0 מכונות"
## [1] "Discrete delta-T Fit  eagle 0 מכונות"
## [1] "P-L GoF: 0.14941650897327"
## [1] "P-L xmin: 22"
## [1] "P-L pars: 3.34"

## [1] "L-N GoF: 0.0829575029348313"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 1.9451744639058"  "L-N pars: 1.22136602124167"
## [1] "LogNormal fit: 1.9977882706341 - -121.157392448782" 
## [2] "LogNormal fit: 1.15803651937065 - -121.157392448782"
## [1] "Exponential fit: 0.0708333333333333 - -124.012469695716"
## [1] "Poisson GoF: 0.372876002062257"
## [1] "Poisson xmin: 8"
## [1] "Poisson pars: 25.9997879631509"
## [1] "Exp GoF: 0.132178679418065"
## [1] "Exp xmin: 7"
## [1] "Exp pars: 0.0544140594414452"
## [1] "Continuous delta-T Fit  eagle 0 מכונות"
## [1] "P-L GoF: 0.147519571385953"
## [1] "P-L xmin: 29"
## [1] "P-L pars: 4.17"

## [1] "L-N GoF: 0.0861706178220314"
## [1] "L-n xmin: 17"
## [1] "L-N pars: 2.82777372083225"  "L-N pars: 0.756435410437184"
## [1] "Weibull GoF: 0.103867836079782"
## [1] "Weibull xmin: 17"
## [1] "Weibull pars: 0.60028224295599" "Weibull pars: 5.31378715362886"
## [1] "Exp GoF: 0.0878676674458052"
## [1] "Exp xmin: 17"
## [1] "Exp pars: 0.06"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  101 
## median:  6.5 
## mean:  14.11765 
## estimated sd:  18.97968 
## estimated skewness:  3.169153 
## estimated kurtosis:  15.98399 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.8894247  0.1120886
## scale 13.2120004  2.7022244
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 1.997788  0.1986016
## sdlog   1.158037  0.1404321
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## rate 0.07083333 0.01214539

## Goodness-of-fit statistics
##                              1-mle-weibull 2-mle-lnorm 3-mle-exp
## Kolmogorov-Smirnov statistic    0.14491352  0.09213600 0.1850607
## Cramer-von Mises statistic      0.09848292  0.05198073 0.1879074
## Anderson-Darling statistic      0.61759430  0.35439525 0.9724573
## 
## Goodness-of-fit criteria
##                                1-mle-weibull 2-mle-lnorm 3-mle-exp
## Akaike's Information Criterion      251.0984    246.3148  250.0249
## Bayesian Information Criterion      254.1511    249.3675  251.5513
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.1507007     0.1733507     0.1148424 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.1449135     0.0921360     0.1850607 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##      251.0984      246.3148      250.0249 
## [1] "delta-T Fit  matrix 1 בקרות"
## [1] "Continuous delta-T Fit  matrix 1 בקרות"
## [1] "P-L GoF: 0.365155322088903"
## [1] "P-L xmin: 1"
## [1] "P-L pars: 1.5"

## [1] "L-N GoF: Inf"
## [1] "L-n xmin: NA"
## [1] "L-N pars: NA" "L-N pars: NA"
## [1] "Weibull GoF: Inf"
## [1] "Weibull xmin: NA"
## [1] "Weibull pars: NA" "Weibull pars: NA"
## [1] "Exp GoF: 0.306009610886041"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.02"
## [1] "delta-T Fit  matrix 1 חשמל"
## [1] "Discrete delta-T Fit  matrix 1 חשמל"
## [1] "P-L GoF: 0.228275396935948"
## [1] "P-L xmin: 24"
## [1] "P-L pars: 2.42"

## [1] "L-N GoF: 0.229546325547355"
## [1] "L-n xmin: 24"
## [1] "L-N pars: -21.8098954130087" "L-N pars: 4.30348311633524" 
## [1] "LogNormal fit: 3.07949624550534 - -44.6570531115624"
## [2] "LogNormal fit: 1.58956439210005 - -44.6570531115624"
## [1] "Exponential fit: 0.0208816705336427 - -43.8199516149078"
## [1] "Poisson GoF: 0.3999998832337"
## [1] "Poisson xmin: 28"
## [1] "Poisson pars: 75.9999999853959"
## [1] "Exp GoF: 0.180868032468316"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.0211168023501253"
## [1] "Continuous delta-T Fit  matrix 1 חשמל"
## [1] "P-L GoF: 0.233665108915999"
## [1] "P-L xmin: 24"
## [1] "P-L pars: 2.47"

## [1] "L-N GoF: 0.131308729370107"
## [1] "L-n xmin: 28"
## [1] "L-N pars: 4.23918650020381"  "L-N pars: 0.625863045337499"
## [1] "Weibull GoF: 0.123016620270787"
## [1] "Weibull xmin: 1"
## [1] "Weibull pars: 1.02590517569796" "Weibull pars: 53.3809315009395"
## [1] "Exp GoF: 0.146494132270852"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.02"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  163 
## median:  28 
## mean:  47.88889 
## estimated sd:  51.21632 
## estimated skewness:  1.603515 
## estimated kurtosis:  5.719161 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.8545696  0.2329316
## scale 44.5332900 18.2232994
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 3.079496  0.5298548
## sdlog   1.589564  0.3746633
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate  Std. Error
## rate 0.02088167 0.006944551

## Goodness-of-fit statistics
##                              1-mle-weibull 2-mle-lnorm  3-mle-exp
## Kolmogorov-Smirnov statistic    0.22323866   0.3024975 0.18131895
## Cramer-von Mises statistic      0.05781359   0.1101759 0.05613488
## Anderson-Darling statistic      0.37164126   0.6203584 0.50093965
## 
## Goodness-of-fit criteria
##                                1-mle-weibull 2-mle-lnorm 3-mle-exp
## Akaike's Information Criterion      91.28279    93.31411  89.63990
## Bayesian Information Criterion      91.67724    93.70856  89.83713
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##    0.02609324    0.01401423    0.01242956 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.2232387     0.3024975     0.1813190 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##      91.28279      93.31411      89.63990 
## [1] "delta-T Fit  matrix 1 כללי"
## [1] "Discrete delta-T Fit  matrix 1 כללי"
## [1] "P-L GoF: 0.321683516783708"
## [1] "P-L xmin: 63"
## [1] "P-L pars: 3.89"

## [1] "L-N GoF: 0.277975977224799"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 3.15208034634612" "L-N pars: 1.76811317879026"
## [1] "LogNormal fit: 3.22580632406075 - -36.1284820324626"
## [2] "LogNormal fit: 1.67609529939542 - -36.1284820324626"
## [1] "Exponential fit: 0.0177664974619289 - -35.2130853216983"
## [1] "Poisson GoF: 0.333333333192078"
## [1] "Poisson xmin: 5"
## [1] "Poisson pars: 65.5000000047723"
## [1] "Exp GoF: 0.242718081195022"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.0179448045888978"
## [1] "Continuous delta-T Fit  matrix 1 כללי"
## [1] "P-L GoF: 0.326145750946371"
## [1] "P-L xmin: 63"
## [1] "P-L pars: 3.95"

## [1] "L-N GoF: 0.140127464003704"
## [1] "L-n xmin: 5"
## [1] "L-N pars: 4.194189793238"    "L-N pars: 0.625763489803253"
## [1] "Weibull GoF: 0.15106712605906"
## [1] "Weibull xmin: 1"
## [1] "Weibull pars: 1.31189885675124" "Weibull pars: 70.0288046638948"
## [1] "Exp GoF: 0.282044353489521"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.02"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  118 
## median:  63 
## mean:  56.28571 
## estimated sd:  48.92755 
## estimated skewness:  0.1666737 
## estimated kurtosis:  1.140204 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.8692174  0.2853922
## scale 53.2154927 24.1795090
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 3.225806  0.6335045
## sdlog   1.676095  0.4479546
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##       estimate  Std. Error
## rate 0.0177665 0.006693752

## <simpleError in ans[!test & ok] <- rep(no, length.out = length(ans))[!test &     ok]: replacement has length zero>
## NULL
## NULL
## NULL
## NULL
## [1] "delta-T Fit  matrix 1 מכונות"
## [1] "Discrete delta-T Fit  matrix 1 מכונות"
## [1] "P-L GoF: 0.0877652604138505"
## [1] "P-L xmin: 8"
## [1] "P-L pars: 2.65"

## [1] "L-N GoF: 0.0978839208794516"
## [1] "L-n xmin: 3"
## [1] "L-N pars: 1.96628459626747"  "L-N pars: 0.931948771324101"
## [1] "LogNormal fit: 1.80478939527431 - -148.731079208384"
## [2] "LogNormal fit: 1.08481250438448 - -148.731079208384"
## [1] "Exponential fit: 0.0969827586206897 - -149.994992810517"
## [1] "Poisson GoF: 0.249458623282498"
## [1] "Poisson xmin: 23"
## [1] "Poisson pars: 41.7375483161366"
## [1] "Exp GoF: 0.10639794965218"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.102016902653445"
## [1] "Continuous delta-T Fit  matrix 1 מכונות"
## [1] "P-L GoF: 0.0949388391897608"
## [1] "P-L xmin: 9"
## [1] "P-L pars: 2.87"

## [1] "L-N GoF: 0.129268605925594"
## [1] "L-n xmin: 7"
## [1] "L-N pars: 1.26000842910331" "L-N pars: 1.10905978575963"
## [1] "Weibull GoF: 0.129072142063447"
## [1] "Weibull xmin: 7"
## [1] "Weibull pars: 0.401994331091552" "Weibull pars: 0.510559827400379"
## [1] "Exp GoF: 0.135135135135135"
## [1] "Exp xmin: 3"
## [1] "Exp pars: 0.11"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  61 
## median:  8 
## mean:  10.31111 
## estimated sd:  11.85293 
## estimated skewness:  2.659479 
## estimated kurtosis:  11.20771 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## shape  1.001768  0.1104271
## scale 10.320809  1.6258929
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 1.804789  0.1617143
## sdlog   1.084813  0.1143488
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## rate 0.09698276  0.0144558

## Goodness-of-fit statistics
##                              1-mle-weibull 2-mle-lnorm 3-mle-exp
## Kolmogorov-Smirnov statistic     0.1240435   0.1332685 0.1239034
## Cramer-von Mises statistic       0.1001107   0.1455702 0.1001311
## Anderson-Darling statistic       0.7800800   1.0525319 0.7794744
## 
## Goodness-of-fit criteria
##                                1-mle-weibull 2-mle-lnorm 3-mle-exp
## Akaike's Information Criterion      303.9897    301.4622  301.9900
## Bayesian Information Criterion      307.6030    305.0755  303.7966
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##  2.146519e-02  2.187812e-05  4.284484e-02 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.1240435     0.1332685     0.1239034 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##      303.9897      301.4622      301.9900 
## [1] "delta-T Fit  matrix 1 מסגרות"
## [1] "Discrete delta-T Fit  matrix 1 מסגרות"
## [1] "P-L GoF: 0.437594111678142"
## [1] "P-L xmin: 1"
## [1] "P-L pars: 1.5"

## [1] "L-N GoF: 0.300979125302937"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 1.95796349414156" "L-N pars: 3.07708079719701"
## [1] "LogNormal fit: 3.04101300406689 - -21.1972133015966"
## [2] "LogNormal fit: 2.31486596674472 - -21.1972133015966"
## [1] "Exponential fit: 0.0097323600973236 - -22.5291954135054"
## [1] "Poisson GoF: 0.5"
## [1] "Poisson xmin: 1"
## [1] "Poisson pars: 102.750000000249"
## [1] "Exp GoF: 0.337448253032119"
## [1] "Exp xmin: 5"
## [1] "Exp pars: 0.00760982107706961"
## [1] "Continuous delta-T Fit  matrix 1 מסגרות"
## [1] "P-L GoF: 0.418621154122884"
## [1] "P-L xmin: 1"
## [1] "P-L pars: 1.5"

## [1] "L-N GoF: 0.210239494637762"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 3.98850992080736" "L-N pars: 1.8174175983331" 
## [1] "Weibull GoF: 0.190927409552351"
## [1] "Weibull xmin: 1"
## [1] "Weibull pars: 0.768831758871794" "Weibull pars: 119.183511391755" 
## [1] "Exp GoF: 0.27686983985157"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.01"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  254 
## median:  78 
## mean:  102.75 
## estimated sd:  122.6278 
## estimated skewness:  0.5730134 
## estimated kurtosis:  0.2201699 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.5297679  0.2206577
## scale 64.6215598 64.3200445
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 3.041013   1.157433
## sdlog   2.314866   0.818428
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate  Std. Error
## rate 0.00973236 0.004814158

## <simpleError in ans[!test & ok] <- rep(no, length.out = length(ans))[!test &     ok]: replacement has length zero>
## NULL
## NULL
## NULL
## NULL
## [1] "delta-T Fit  matrix 2 חשמל"
## [1] "Discrete delta-T Fit  matrix 2 חשמל"
## [1] "P-L GoF: 0.163303031700674"
## [1] "P-L xmin: 20"
## [1] "P-L pars: 3.1"

## [1] "L-N GoF: 0.171249808333911"
## [1] "L-n xmin: 20"
## [1] "L-N pars: 0.574022266447369" "L-N pars: 1.24761428138053" 
## [1] "LogNormal fit: 2.31280361458532 - -29.1443946434841"
## [2] "LogNormal fit: 1.53993899388298 - -29.1443946434841"
## [1] "Exponential fit: 0.0460526315789474 - -28.5457926025367"
## [1] "Poisson GoF: 0.391636951567081"
## [1] "Poisson xmin: 11"
## [1] "Poisson pars: 29.999542593147"
## [1] "Exp GoF: 0.169787165816572"
## [1] "Exp xmin: 11"
## [1] "Exp pars: 0.0512997427346405"
## [1] "Continuous delta-T Fit  matrix 2 חשמל"
## [1] "P-L GoF: 0.1707984508811"
## [1] "P-L xmin: 20"
## [1] "P-L pars: 3.21"

## [1] "L-N GoF: 0.143665791467024"
## [1] "L-n xmin: 11"
## [1] "L-N pars: 3.43628203326265" "L-N pars: 0.44423868229735"
## [1] "Weibull GoF: 0.134320224029048"
## [1] "Weibull xmin: 11"
## [1] "Weibull pars: 1.85205718080596" "Weibull pars: 35.8923227113262"
## [1] "Exp GoF: 0.162371848378227"
## [1] "Exp xmin: 11"
## [1] "Exp pars: 0.05"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  63 
## median:  20 
## mean:  21.71429 
## estimated sd:  21.51522 
## estimated skewness:  1.222879 
## estimated kurtosis:  4.77445 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.8773932  0.2777199
## scale 20.5105327  9.2673445
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 2.312804  0.5820422
## sdlog   1.539939  0.4115652
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## rate 0.04605263 0.01739805

## <simpleError in ans[!test & ok] <- rep(no, length.out = length(ans))[!test &     ok]: replacement has length zero>
## NULL
## NULL
## NULL
## NULL
## [1] "delta-T Fit  matrix 2 כללי"
## [1] "Discrete delta-T Fit  matrix 2 כללי"
## [1] "P-L GoF: 0.393319341539368"
## [1] "P-L xmin: 1"
## [1] "P-L pars: 1.5"

## [1] "L-N GoF: 0.274392562643596"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 1.79374399645958" "L-N pars: 2.45247953251414"
## [1] "LogNormal fit: 2.51623147460341 - -18.3241873461105"
## [2] "LogNormal fit: 1.90765898634113 - -18.3241873461105"
## [1] "Exponential fit: 0.0235294117647059 - -18.9980163037215"
## [1] "Poisson GoF: 0.356076986465442"
## [1] "Poisson xmin: 4"
## [1] "Poisson pars: 56.333332969187"
## [1] "Exp GoF: 0.314569661343123"
## [1] "Exp xmin: 4"
## [1] "Exp pars: 0.0189419432210178"
## [1] "Continuous delta-T Fit  matrix 2 כללי"
## [1] "P-L GoF: 0.361324950943693"
## [1] "P-L xmin: 1"
## [1] "P-L pars: 1.5"

## [1] "L-N GoF: 0.163951814791747"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 3.30426373946755" "L-N pars: 1.48606515096854"
## [1] "Weibull GoF: 0.177763327486291"
## [1] "Weibull xmin: 1"
## [1] "Weibull pars: 0.874551396203758" "Weibull pars: 51.6610825639708" 
## [1] "Exp GoF: 0.191764533584249"
## [1] "Exp xmin: 1"
## [1] "Exp pars: 0.02"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  113 
## median:  28 
## mean:  42.5 
## estimated sd:  52.48809 
## estimated skewness:  1.026799 
## estimated kurtosis:  2.620176 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## shape  0.6313312  0.2594455
## scale 31.4675750 26.3057775
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 2.516231  0.9538295
## sdlog   1.907659  0.6744585
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## rate 0.02352941 0.01174341

## <simpleError in ans[!test & ok] <- rep(no, length.out = length(ans))[!test &     ok]: replacement has length zero>
## NULL
## NULL
## NULL
## NULL
## [1] "delta-T Fit  matrix 2 מכונות"
## [1] "Discrete delta-T Fit  matrix 2 מכונות"
## [1] "P-L GoF: 0.118281810477243"
## [1] "P-L xmin: 6"
## [1] "P-L pars: 1.91"

## [1] "L-N GoF: 0.0950760925692842"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 1.18801271446358" "L-N pars: 1.50719183736277"
## [1] "LogNormal fit: 1.52119496310624 - -78.6555510143306"
## [2] "LogNormal fit: 1.22886200785823 - -78.6555510143306"
## [1] "Exponential fit: 0.0862068965517241 - -86.275127452808"
## [1] "Poisson GoF: 0.333333325637481"
## [1] "Poisson xmin: 23"
## [1] "Poisson pars: 61.9999993331997"
## [1] "Exp GoF: 0.256637560933383"
## [1] "Exp xmin: 8"
## [1] "Exp pars: 0.0329801296906595"
## [1] "Continuous delta-T Fit  matrix 2 מכונות"
## [1] "P-L GoF: 0.126226570009461"
## [1] "P-L xmin: 6"
## [1] "P-L pars: 1.99"

## [1] "L-N GoF: 0.109071784725105"
## [1] "L-n xmin: 4"
## [1] "L-N pars: -6.30376427993072" "L-N pars: 3.18041713205563" 
## [1] "Weibull GoF: 0.13506619264925"
## [1] "Weibull xmin: 4"
## [1] "Weibull pars: 0.199680942901582"   "Weibull pars: 0.00460377830993915"
## [1] "Exp GoF: 0.146959357293924"
## [1] "Exp xmin: 8"
## [1] "Exp pars: 0.03"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  99 
## median:  5 
## mean:  11.6 
## estimated sd:  22.33458 
## estimated skewness:  3.254631 
## estimated kurtosis:  13.78821 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## shape 0.7238806  0.1008989
## scale 8.8246942  2.5961854
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 1.521195  0.2457724
## sdlog   1.228862  0.1737868
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##       estimate Std. Error
## rate 0.0862069 0.01723906

## Goodness-of-fit statistics
##                              1-mle-weibull 2-mle-lnorm 3-mle-exp
## Kolmogorov-Smirnov statistic     0.1939853  0.12481541 0.3069224
## Cramer-von Mises statistic       0.2015352  0.08025593 0.6709283
## Anderson-Darling statistic       1.2692918  0.59831322 3.5191785
## 
## Goodness-of-fit criteria
##                                1-mle-weibull 2-mle-lnorm 3-mle-exp
## Akaike's Information Criterion      169.9731    161.3111  174.5503
## Bayesian Information Criterion      172.4108    163.7489  175.7691
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##   0.108515649   0.196759821   0.007089424 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##     0.1939853     0.1248154     0.3069224 
## 1-mle-weibull   2-mle-lnorm     3-mle-exp 
##      169.9731      161.3111      174.5503 
## [1] "delta-T Fit  matrix 2 מסגרות"
## [1] "Discrete delta-T Fit  matrix 2 מסגרות"
## [1] "P-L GoF: 0.252514851288637"
## [1] "P-L xmin: 2"
## [1] "P-L pars: 1.55"

## [1] "L-N GoF: 0.19753036338833"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 1.67713593766633" "L-N pars: 1.63247136922859"
## [1] "LogNormal fit: 1.93928819547356 - -25.8448906879525"
## [2] "LogNormal fit: 1.39640421184072 - -25.8448906879525"
## [1] "Exponential fit: 0.0630630630630631 - -26.3453403657991"
## [1] "Poisson GoF: 0.399995526679527"
## [1] "Poisson xmin: 3"
## [1] "Poisson pars: 21.5999977637734"
## [1] "Exp GoF: 0.285398979765331"
## [1] "Exp xmin: 4"
## [1] "Exp pars: 0.0439707055621266"
## [1] "Continuous delta-T Fit  matrix 2 מסגרות"
## [1] "P-L GoF: 0.217968501835692"
## [1] "P-L xmin: 1"
## [1] "P-L pars: 1.52"

## [1] "L-N GoF: 0.160344956601872"
## [1] "L-n xmin: 1"
## [1] "L-N pars: 2.03635786853555" "L-N pars: 1.43363736142169"
## [1] "Weibull GoF: 0.183264563109808"
## [1] "Weibull xmin: 1"
## [1] "Weibull pars: 0.694128078700398" "Weibull pars: 12.4209945664895" 
## [1] "Exp GoF: 0.224724224508375"
## [1] "Exp xmin: 2"
## [1] "Exp pars: 0.06"
## [1] "cont fit+"
## summary statistics
## ------
## min:  1   max:  42 
## median:  4 
## mean:  15.85714 
## estimated sd:  18.05019 
## estimated skewness:  0.8173641 
## estimated kurtosis:  1.499197 
## Fitting of the distribution ' weibull ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## shape  0.802683  0.2415932
## scale 14.021383  6.9909258
## Fitting of the distribution ' lnorm ' by maximum likelihood 
## Parameters:
##         estimate Std. Error
## meanlog 1.939288  0.5277912
## sdlog   1.396404  0.3732039
## Fitting of the distribution ' exp ' by maximum likelihood 
## Parameters:
##        estimate Std. Error
## rate 0.06306306  0.0238296

## <simpleError in ans[!test & ok] <- rep(no, length.out = length(ans))[!test &     ok]: replacement has length zero>
## NULL
## NULL
## NULL
## NULL
close(f)