                CHANGES in `gzippath' VERSION 0.1_7   (2012-8-20)

  o  change glmcd on how the response variable y is scaled for family other than gaussian

  o 8-25-2012 modification on gzipath_0.1-9.tar.gz
    b0 should be the average of response variable y for non-standardized case, in an agreement with the so determined lambda max for which beta = 0. This is correct in R function lmnet, see zipath_0.1-2_08_10_2012.tar.gz

                CHANGES in `gzipath' VERSION 0.1_13   (2013-11-24)

  o for weighted penalized regression glmreg_fit, with standardize=TRUE, the weights are normalized to n*weights/sum(weights). Now added standardize=FALSE and the weights are not normalized. 
  o zipath function was modified to incorporate glmreg_fit for weighted penalized Poisson and Negative Binomial regression. The tuning parameters were changed based on modified glmreg_fit. 
                
                CHANGES in `gzipath' VERSION 0.1_14   (2014-5-8)

  o for rescale=TRUE and penalty="mnet" or "snet" in zipath, data driven lambda.zero[1] (i.e., the maximum value of lambda in zero component) is too small, now changed to 0.5*sqrt(lambda.zero[1]). This may be modified if the maximum value of lambda in glmreg was changed in the similar situations. 

                CHANGES in `gzipath' VERSION 0.1_14   (2014-6-9)

  o change package name to `mpath'
                
                CHANGES in `mpath' VERSION 0.1_15   (2014-9-23)

  o apply patch from Martyn Plummer <plummerm@iarc.fr> to replace isna and lgamma in src Fortran file to avoid failure on some platforms
                
                CHANGES in `mpath' VERSION 0.1_16   (2014-10-25)

  o change src/midloop.f, now saturated model only applies to logistic regression
  o add penalty.factor.count and penalty.factor.zero in zipath function to allow different penalties for each of the variables.
  o add vignette to illustrate analysis of German health care demand
  
                CHANGES in `mpath' VERSION 0.1_17   (2014-11-10)

  o fix a bug in function estfunReg, which is supposed to work only for one penalty parameter 
  o fix a bug in src/lmnetGaus.f, computing meanx 
                
                CHANGES in `mpath' VERSION 0.1_18   (2015-2-26)

  o vignette file was updated to be consistent with the corresponding paper Wang et al (2015)
  o fix bugs in cv.glmreg.Rd, cv.glmregNB.Rd and cv.zipath.Rd
  o in findlam function, verify 0 < alpha <= 1
  o fix a bug with intercept estimate for family="gaussian"
  o remove the threshold value mu=1000 for family=4 in midloop.f, lines 167 and 207
  o change function name predict.zeroinfl1 to predictzeroinfl1

                CHANGES in `mpath' VERSION 0.1_19   (2015-7-23)

  o editorial changes to files in man directory 

                CHANGES in `mpath' VERSION 0.1_20   (2015-7-23)

  o rebuild static_german.pdf, updating a reference
  o fix a bug in loss function for family="gaussian"

                CHANGES in `mpath' VERSION 0.1_21   (2015-11-23)

  o minor changes to print lambda 4 digits

               CHANGES in `mpath' VERSION 0.2-1 (12-09-2015)

  o add parallel computing for cross-validation in cross-validation function
  o remove vuong test, based on Wilson (2015), The misuse of the Vuong test for non-nested models to test for
    zero-inflation, Economics Letters, 127: 51:53

               CHANGES in `mpath' VERSION 0.2-3 (08-10-2016)

  o change the format of b0 and beta in glmreg function when standardize=FALSE, to be consistent with standardize=TRUE
  o for findlam function in glmreg.R, change
    if(standardize) 
        weights <- weights/sum(weights)
    
    to 
    
    if(family=="gaussian" || standardize)     
        weights <- weights/sum(weights)

    This corrects an error in glmreg with family="gaussian" and standardize=FALSE
  o In src/lmnetGLM.f, remove lmnetGLM subroutine, which was not used anymore
  o fix subroutines in lmnetGLM.f, lmnetGaussian.f, midloop.f and outloop.f regarding gfortran warning messages with an email request from cran.R-project on August 28, 2016 

               CHANGES in `mpath' VERSION 0.2-4 (08-30-2016)
  
  o after a change of penGLM subroutine in midloop.f (removing unused argument n), glmreg.R and zipath.R were changed when invoking penGLM. 

               CHANGES in `mpath' VERSION 0.3-1 (09-16-2016)
  
  o add ncl and nclreg, and relevant files for nonconvex-based models
  o fix a bug computing penval in glmreg, add penalty.factor when calling penGLM in glmreg and zipath. These bugs don't affect the previous analysis results
               
               CHANGES in `mpath' VERSION 0.3-2 (07-14-2017)
  
  o  To register native routines and to disable symbol search.
     $cd mpath
     $R
     > tools::package_native_routine_registration_skeleton(".")
     copy and paste the full output in a packagename_init.c (i.e., mpath_init.c) file to be put in src/
  o  change convergence criteria in nclreg.R
     d1 <- sum((fk_old - fk)^2)
     #d1 <- sum((fk_old - fk)^2)/sum(fk_old^2) ### this can cause a problem if fk_old is zero
  o  another change of convergence criteria in nclreg.R: comment out the following lines
                 #if(k > 1){
                         #    if(los[k] > los[k-1]){
                              #k <- iter
                              #}
                         #}
  o  fix a bug in nclreg.R: lambda.min.ratio was not used in computing lambda with glmreg_fit
  o  in nclreg.R, computing solution path stops if the numbers in exponential function become too big (infinite) 
     if(any(is.nan(h))){ # exit loop 
                    stopit <- TRUE
                    break
            }
  o  add type.init and relevant arguments in nclreg_fit function to have three types of initial parameters and lambda values
  o  replace fraction with lambda in cv.glmreg.R, cv.nclreg.R, cv.zipath.R and cv.glmregNB.R. This only affects the values of x-axis in plots, but not cross-validation results
  o  add type.path to have two different updating methods when computing solution paths 
               
               CHANGES in `mpath' VERSION 0.3-3 (08-17-2017)
  
  o  cycle through active set with modified codes in Fortran files in src directory 
               
               CHANGES in `mpath' VERSION 0.3-4 (08-22-2017)
  
  o  add type="active" in R/nclreg_fit function
  o  fix a bug with cv.zipath when plot.it=TRUE
  o  add stopImplicitCluster() after registerDoParallel
               
               CHANGES in `mpath' VERSION 0.3-5 (10-17-2017)
  o  add vignette to illustrate classification of cancer patients with penalized robust nonconvex loss functions
  o  change zipath function to cycle through warm start. The results can be different from the previous versions.
  o  fix bugs with zipath when trace=TRUE and the zero component is an intercept-only model
               
               CHANGES in `mpath' VERSION 0.3-6 (10-04-2018)
  o  fix bugs when all elements of penalty.factor=0 in glmreg_fit or glmregNB. In this case, we set lambda=0 for each variable, and all penalty.factor=1. 
  o  fix bugs when all elements of penalty.factor.count=0 or penalty.factor.zero=0 in zipath. In this case, we set corresponding lambda = 0.
  o  fix bugs when activeset=NULL in nclreg function
               
               CHANGES in `mpath' VERSION 0.3-7 (01-26-2019)
  o  changes were made to make offset in glmreg work. This includes changes in outloop.f, midloop.f, midloopGLM.f, lmnetGLM.
  o  Changes were made in midloopGLM.f so that iterations run and check for convergency for b0 as well as beta  
  o  Changes were made in zipath to make offset work
  o  offset is now working in glmregNB, zipath, cv.glmreg, cv.glmregNB and cv.zipath
               
               CHANGES in `mpath' VERSION 0.3-8 (03-03-2019)
  o  R zipath function has both Fortran and R computations, can be useful to compare the results.
  o  changes were made on how active set works in src/outloop.f file. Now, we cycle through the active set until convergence, then cycle through all the variables ONCE, this is an reverse to the previous procedure. This includes changes in outloop.f, midloop.f, midloopGLM.f, lmnetGLM, add src/find_activeset.f to simplify the codes.
  o  R/nclreg seems to be incorrect when update beta[activeset, i], since activeset is relative to the current x.act, not x. The new Fortran subroutine using dynamic allocation to deal with this. The Fortran subroutine nclreg_fortran.f conducts the three layers of iteration loops, lambda, MM and internal penalty estimation loop.
  o  Not a good idea to convert theta.ml R function to Fortran subroutine since the speed actually is slower in Fortran. This is probably because digamma and trigamma functions in a Fortran subroutine used C functions. In contrast, the R function theta.ml directly used these C functions. Maybe there are other reasons. But we leave a glmregNB.R with the Fortran subroutine glmregnb_fortran.
  o To do: coefficients of zipath are on the rescaled predictors when standardize=TRUE; needs to be converted to the original scale (somehow the related codes at the end of zipath_fit are commented) 

               CHANGES in `mpath' VERSION 0.3-9 (04-06-2019)
  o  Major improvement on zipath.R. Replace the R codes with Fortran codes to compute lmax. Compute the solution path with zipath_fortran subroutine to replace the R codes.

               CHANGES in `mpath' VERSION 0.3-10 (04-12-2019)
  o  update zipath_fortran subroutine with an active set approach. Is this faster than nonactive approach?
  
               CHANGES in `mpath' VERSION 0.3-11 (04-12-2019)
  o  implement both active and nonactive path in R zipath function
  
               CHANGES in `mpath' VERSION 0.3-13 (05-18-2019)
  o  fix bugs in Fortran subroutines, mostly related to uninitialized values after dynamic allocate of vectors.
  o  in vignettes/brcancer.Rnw, compare type.path="nonative" and "active"
  o  in man/nclreg.Rd, provide examples of different solution paths
 
               CHANGES in `mpath' VERSION 0.3-14 (05-24-2019)
  o  changes related to zipath: src/zi_onelambda to replace src/zi.f, and convergency criteria is changed 
  o  zipath can be slow for some data, and change outloop subroutine from active set to nonactive set can help substantially. The reason is that the active set approach can repeat the cycle without convergence. Will be addressed in version 0.3-15.
  
               CHANGES in `mpath' VERSION 0.3-15 (06-03-2019)
  o  still use active set, as in version 0.3-13, but change the number of maximum iteration from 100 to 2 when determining active set in outloop.f. Similarly in lmnetGaussian.f. This will reduce the computing times in case of nonconvergence. The program looks for a cycle that repeats itself, default is 2
  o  fix bugs in nclreg_ad.f regarding m_act and jk, and similar bugs in zipath_active.f

               CHANGES in `mpath' VERSION 0.3-16 (07-09-2019)
  o to avoid mismatch between predictor variables and the estimated coefficients - this can happen if the input data contains response variable but not appropriately handled, add the following line in R/predict.glmreg.R
    if(dim(object$beta)[1] != m) stop("number of columns in newx should be the same as number of rows  in beta\n")
  
               CHANGES in `mpath' VERSION 0.3-17 (07-11-2019)
  o add intercept option in penalized regression
  o make clarity in vignettes/kkt.Rnw  
  
               CHANGES in `mpath' VERSION 0.3-18 (10-03-2019)
  o gfortran in GCC trunk aka 10.0.0 is reporting new warnings
  
               CHANGES in `mpath' VERSION 0.3-19 (11-07-2019)

  o no change
  
               CHANGES in `mpath' VERSION 0.3-20 (11-10-2019)

  o glmnet 3.0_0 doesn't export nonzeroCoef and plotCoef function, therefore copy the relevant R files in glmnet
  
               CHANGES in `mpath' VERSION 0.3-21 (11-20-2019)

  o subroutine linkinv in midloopGLM.f needs safeguard with too small mu for poission, just like negbin
  
               CHANGES in `mpath' VERSION 0.3-22 (02-19-2020)

  o copy R function zeroinfl from package pscl, which is scheduled to be archival on 2020-03-04, and archiving this will necessitate also archiving its strong reverse dependencies. Consequently, changes were made on NAMESPACE file.
  
               CHANGES in `mpath' VERSION 0.3-24 (02-29-2020)

  o remove zeroinfl function and data from pscl
  o offset related updates: R functions init, logLik.glm, cv.glmreg.R, cv.glmregNegbin.R, zipath (fit0); Fortran subroutine zi_onelambda remove 4 lines and simply use the updated mu and eta, and compute yhat=yhat+offset in midloop and midloopGLM
  o change the default value of init.theta from 1 to NULL in R/zipath.R. This allows user specified initial value of theta regardless whether theta.fixed is TRUE/FALSE 
  
               CHANGES in `mpath' VERSION 0.3-25 (03-25-2020)

  o fix bugs in R/p_zipath.R when no variable is selected in zipath
  o remove fit object in the output of cv.zipath so that predict an object of cv.zipath is not feasible, and should be via zipath. The reason for such change is that cv.zipath can take both formula and matrix, hence predict on cv.zipath object can easily lead to problems in codes.
  o minor bugs fix after running: R CMD check --run-dontrun mpath_0.3-25.tar.gz
  
               CHANGES in `mpath' VERSION 0.4-2.1 (05-05-2020)

  o remove cost argument in ncl, nclreg, co, coreg since they weren't used in optimization problems, unlike the bst package, but still use bst/loss function with cost=0.5, then mutiply 2, to be consistent with the optimization problem. Fix cost in src/loss.f accordingly. Make similar changes to src/loss2.f
  
               CHANGES in `mpath' VERSION 0.4-2.2 (05-10-2020)

  o remove cost argument in R/co, R/coreg since they weren't used in optimization problems, unlike the bst package. Remove cost in src/coreg_ad src/coreg_fortran, src/loss2
  
               CHANGES in `mpath' VERSION 0.4-2.3 (05-10-2020)

  o remove cost argument in src/loss, src/nclreg_ad, src/ncl_fortran
  
               CHANGES in `mpath' VERSION 0.4-2.4 (05-11-2020)

  o make type.init="co" work in R/coreg function for dfun=1, 4 or 5
  o make type.init="bst" or "heu" work in R/coreg function for cfun=4 and dfun=1 or 4
  o complete src/compute_u for dfun from 1-7
  o complete src/compute_z for sfun from 1-7
  o complete src/compute_g for dfun from 1-7
  o complete src/compute_v for cfun from 1-7
  o develop loss2 to compute composite loss values
  o problems occur in nclreg, and revoke version 0.4_2.2 the following files: R/ncl.R, R/nclreg.R, src/loss.f, src/mpath_init.c, src/nclreg_ad.f, src/nclreg_fortran.f
  
               CHANGES in `mpath' VERSION 0.4-2.5 (05-13-2020)

  o add R/check_s for R/co and R/coreg
  o remove cost argument in src/loss.f, and make changes accordingly in: R/ncl.R, R/nclreg.R, src/loss.f, src/mpath_init.c, src/nclreg_ad.f, src/nclreg_fortran.f
  
               CHANGES in `mpath' VERSION 0.4-2.6 (05-14-2020)

  o update check_s in R/co.R
  o remove 1/2 in objective function in man/ncl.Rd, ncl,_fit.Rd, nclreg.Rd, nclreg_fit.Rd
  o add man/co.Rd, co_fit.Rd, coreg.Rd, coreg_fit.Rd
  o add co_evalerr R function and replace evalerr in co.R and coreg.R 
  o changes to R/co.R on initial values when cfun is not 4
  o develop assign_s to assign default s value when missing in R/co.R and R/coreg.R
  o src/lmnetGLM.f: removing checking convergency of b0, intercept
  o src/glmreg_fit_fortran.f: add a check about y value: 0 <= y <= 1 if family=2
  o R/predict.glmreg.R has a bug with new offset
  o fix bugs with new offset in predict.nclreg, predict.coreg, predict.ncl, predict.co, cv.glmreg.R, cv.glmregNegbin.R
  o make b0=0 if intercept=FALSE in src/lmnetGLM.f 
  o R/glmreg.R: compute lambda sequence for alpha=0 with alpha=1e-3
  
               CHANGES in `mpath' VERSION 0.4-2.8 (06-30-2020)

  o add weights in src/loss2.f and change codes calling loss2 in R and src folders 
  o fix a bug in src/compute_z.f for cfun=6 when z=0 - rewrite the expression
  o for cfun=6, the domain of s value is changed from >= 1 to 0 < s <= 1 such that g(z) is concave when z >= 0.
  
               CHANGES in `mpath' VERSION 0.4-2.9 (07-14-2020)

  o add a factor to cfun in src/compute_v.f from cfun=2-6 such that For gcave and $\sigma=1, z=0$, the derivative is -1. For other concave functions, we have derivative -1 at $z=0$. Furthermore, the derivative = -1 as $\sigma \to \infty$ except for dcave, where the derivative = $-\frac{1}{z+1}$ as $\sigma \to \infty$
  
               CHANGES in `mpath' VERSION 0.4-2.10 (07-18-2020)

  o change definition of gcave for cfun, derivative, loss function in both src and R codes. This expands the range of gcave for s from (0, 1] to (0, \infty) and derivative bounded away from \infty at argument 0 when s \in (0, 1).
  o change the parameterization of tcave from 1-sigma to sigma
  
               CHANGES in `mpath' VERSION 0.4-2.11 (07-29-2020)

  o add parallel computing in R/glmregNB
  o modify src/coreg_fortran to simplify. TODO: similar changes in src/coreg_ad, src/ncvreg_ad, src/ncvreg_fortran
  o in R/cv.glmreg, when type="loss" and family="binomial", it meant for loglikelihood loss function, thus, we seek maximum value, unlike for type="error", we seek minimum value. Modified the code accordingly
  
               CHANGES in `mpath' VERSION 0.4-2.12 (08-11-2020)

  o modify cfun="ecave" and "gcave" in src/loss2, change the intercept to 0 from previous values, which are possibly < 0
  o change ytmp to y in R/coreg when calling Fortran subroutine coreg_ad and coreg_fortran, and change y to ytmp in src/coreg_onelambda when calling src/glmreg_fit_fortran. The reason is that in coreg_ad and coreg_fortran, the repsonse variable is +1/-1 when dfun=5, and in glmreg_fit_fortran, the response variable is 1/0 when family=2 (binomial)
  
               CHANGES in `mpath' VERSION 0.4-2.13 (08-17-2020)

  o Fix a bug with standardize=TRUE, which doesn't generate meaningful coef for R/coreg when dfun=5. For instrance, when s is large, the coef should be similar to glmreg when family="binomial", but it is not. The reason is that coreg calls for glmreg_fit_fortran, with input start, this may lead to saturated binomial model fitting. This would be the same if calling R/glmreg. Thus, glmreg_fit_fortran doesn't call updated start if dfun=5
  o add argument standardize in src/coreg_onelambda, and pass this argument to src/glmreg_fit_fortran. Previously, it was set as 0 in the latter
  o add argument rescale in R/coreg and subsequentially related src/coreg_ad, src/coreg_fortran, src/coreg_onelambda
  o fix a bug in src/glmreg_fit_fortran: input maxit was changed if family=1. This has unexpected sequence since this subroutine is repeated in a loop. Modify src/glmreg_fit_fortran to maintain the old x values if standardize=TRUE and family=1
  o consequently, make changes in R/nclreg which uses src/glmreg_fit_fortran, following R/coreg regarding argument standardize
  
               CHANGES in `mpath' VERSION 0.4-2.14 (08-24-2020)

  o change R/co to R/coglm by adding dfun="poisson", "negbin"
  o add dfun="poisson", "negbin" in R/coreg and make changes accordingly: src/coreg_ad, src/coreg_fortran
  o add src/loss3 and src/compute_wt3 for dfun="poisson" and "negbin"
  o modify R/coglm.R such that weights_update is initialized as in version 0.4-2.13 for dfun=1,4,5, not equal weights
  
               CHANGES in `mpath' VERSION 0.4-2.15 (08-27-2020)

  o TODO: work in progress on R/coglm on general glm and minor changes on R/coreg
  o fix src/coreg_onelambda when calling update_wt, where fk_old should be replaced with etastart, as in R/coreg - typeA
  
               CHANGES in `mpath' VERSION 0.4-2.16 (10-14-2020)

  o change function names from coglm to ccglm, coreg to ccglmreg, cosvm to ccsvm, etc.
  o move ccglmExample.Rmd, ccsvmExample.Rmd and german.Rmd out of vignettes folder (mpath_vignettes) to avoid some errors in some systems on CRAN/rhub for unknown reasons. Set up static link in vignettes instead
  o How to build mpath:
    R CMD build --compact-vignettes="both" mpath
  
               CHANGES in `mpath' VERSION 0.4-2.17 (11-10-2020)

  o add .Rbuildignore to ignore three Rmd files in vignettes
  o dontrun the example in man/cv.ccsvm for which on CRAN r-oldrel-windows-x doesn't work and could not be reproduced on current system
  
               CHANGES in `mpath' VERSION 0.4-2.18 (11-10-2020)

  o fix a bug in src/gfunc.f when probability is close to 0/1 in binary case
  o add more description of s value in man/nclreg_fit.Rd
  o pass argument offset in 
    cv.nclreg.matrix <- function(x, y, weights, offset=NULL, ...){
      RET <- cv.nclreg_fit(x, y, weights, offset=offset, ...)
  o R/nclreg.R with argument standardize=TRUE generates potentially quite different prediction error and variable selection compared to standardize=FALSE for brcancer.Rnw in the vigenette folder. Largely revoke the changes to mpath version 0.3-15 with respect to standardize argument in R/nclreg.
  o Does argument standardize have the similar impact to R/ccglmreg as R/nclreg?
  
               CHANGES in `mpath' VERSION 0.4-2.19 (04-04-2021)

  o fix a bug in R/glmreg.R when computing nulldev. 
  
               CHANGES in `mpath' VERSION 0.4-2.20 (12-03-2021)

  o zipath calculated residuals = sqrt(weights)*(Y - Yhat), where weights were sum to 1. This has been recalculated such that weights are sum to n, where n is the sample size.
  
               CHANGES in `mpath' VERSION 0.4-2.21 (01-18-2022)
  
  o change R/compute_wt.R and R/compute_g.R, where z values must be non-negative in the past versions. This restriction is removed since z can be negative when the loss function is negative loglikelihood function in the exponential family, for instance, the gamma distribution
  o export functions cfun2num, y2num, y2num4glm, check_s, used in R package ccboost 
  
               CHANGES in `mpath' VERSION 0.4-2.22 (02-14-2022)
  
  o change COCO to IRCO which best describes the algorithm and is easier to understand
  o change ccglm to irglm, ccsvm to irsvm in files in folders R/src/man/vignettes, NAMESPACE, .Rbuildignore
