Changes: ver 1.1.0 (2024-03-29)
1) Bug fix in build_rkhs() and pred_rkhs() when type = "par"
* Previously neglected to assign column names to design matrix
* Resulted in an error when calling build_depe()
* Now column names are assigned before calling build_depe()
2) Added new predictor option (type = "ran") for random effects
* Allows for easy incorporation of random effects/intercepts
* New default type for unordered factors with 20 or more levels
* Similar to type = "nom" but shrinks to zero instead of mean
3) Added S3 plotting methods for "sm" and "gsm" objects
* Plots effect functions for each term in the model
* Only supports main effects and two-way interactions
* plotci() is used for main effects and image() for interactions
4) Added color.legend() functions for adding color legends to images
* Designed to add a color legend to margin of an image() plot
* User can control the limits, colors, and location of legend
* plot.gsm() and plot.sm() use this function to plot legends
5) Added some references to help files and improved the Description file
6) Added startup message with ascii graphic and citation information
Changes: ver 1.0-9 (2022-07-20)
1) Expanded functionality of residuals.ss and residuals.sm functions
* Previously these functions only returned working residuals
* Now produces all 5 residuals produced by residuals.lm
* The 'working' residuals are still the default type
2) Added df.residual to output of "ss", "sm" and "gsm" functions
* df.residual = nobs - df
* nsdf = null space df
* df = trace of smoothing matrix = nsdf + csdf (contrast space df)
3) Added many standard S3 methods for "ss", "sm" and "gsm" objects
* extraction: coef, deviance, fitted, model.matrix, residuals, vcov, weights
* inference: boot, predict, and summary
* printing methods are also available
4) Added regression diagnostic tools and plotting functions
* specific: cooks.distance, covratio, dfbeta, dfbetas, hatvalues
* residual: rstandard and rstudent
* generics: influence, smooth.influence, smooth.influence.measures
* diagnostic.plots() is a analogue of the plot.lm function
5) Iterative estimation of variance weights for ss() objects
* homosced = FALSE estimates variance weights from data
* iter.max controls maximum number of iteration (default = 1)
* variance weights are assumed to be a (smooth) function of x
6) Added "newdata" argument to varimp() function
* Previously VARIMP indices were calculated using training data
* "newdata" argument can be used to evaluate prediction VARIMP
* Default still computes VARIMP using the training data
7) Bug fix for summary.sm() when using tprk = FALSE
* Previously resulted in error when testing significance of factor with 2 levels
* Error was caused because the design matrix was being treated as a vector
* Now uses drop=FALSE to ensure that design matrix is a matrix with 1 column
8) Computational stability improvements for bootstrap functions
* Previously could obtain infinite bias correction factors
* Now qnorm(0.0001) <= z0 <= qnorm(0.9999) to avoid -Inf/Inf
* na.rm is used for all sample quantile evaluations
9) varinf(): variance inflation factors (new function)
* Directly computes VIF from fit sm() or gsm() objects
* Previously (sqrt of) VIF was only obtainable from summary()
* varinf() provides direct access to VIF w/o need to use summary()
Changes: ver 1.0-8 (2022-03-30)
1) Bug fix in gsm() function: working (IRPLS) residuals
* Previously residuals were incorrectly centered at mu instead of eta
* Now residuals satisfy: z = linear.predictors + residuals
* Note that z is pseudo-response at convergence of IRPLS
2) Bug fix in gsm() function: standard errors for binomial with weights
* Dispersion parameter was incorrectly divided by mean(weights)
* Previous standard error estimates were too small
* Corrected version uses a dispersion of 1 for SE calculations
3) Bug fix in sm() function: tprk = FALSE and n < length(coefficients)
* Previous code assumed that n >= length(coefficients)
* This assumption could be wrong for tprk = FALSE with small n
* Corrected version does not require n >= length(coefficients)
4) boot.sm and boot.gsm
* New functions for bootstrapping "sm" objects
* Two nonparametric options (cases and residuals) and parametric option
* Computes SE and BCa CIs for any user-specified statistic
5) fitted.ss, fitted.sm, fitted.gsm, resid.ss, resid.sm, resid.gsm
* New functions for extracting/computing fitted values and residuals
* For ss objects, predicts from original data (if keep.data = TRUE)
* For sm and gsm objects, fitted values are extracted from fit model
6) model.matrix.ss, model.matrix.sm, model.matrix.gsm
* New functions for extracting/computing design matrices
* For ss objects, the basis.poly function is called
* For sm and gsm objects, predict function (w/ design = TRUE) is used
7) msqrt
* New function for stable computation of matrix square roots
* Allows for computation of standard or inverse square root
* Allows for computation of asymmetric or symmetric sqrt
8) Improvements to function internals for matrix (inverse) square roots
* msqrt is now used to compute matrix (inverse) sqrt
* Used in all basis.x functions when ridge = TRUE
* Used in all modeling functions (ss, sm, gsm)
9) Major improvements to hyperparameter tuning for sm() and gsm()
* Removed "update" argument (update = FALSE no longer available)
* Added "skip.iter" argument (skip.iter = FALSE for deep tuning)
* No changes to the default functionality of either function
10) number2color
* New function for mapping numbers to colors (useful for plotting)
* Uses .bincode to bin data equidistantly or via sample quantiles
* Each bin is assigned a unique color from user-specified palette
Changes: ver 1.0-7 (2022-02-11)
0) Updated and added some references
* Open source paper on tuning penalized splines
* https://doi.org/10.3390/stats4030042
1) Bug fix in sm() standard errors (se.fit) when using weights
* The se.fit are now correctly divided by sqrt(weights)
* Only affected se.fit from fit model (not predictions)
2) Bug fix in basis.tps with m = 1
* Previously could result in an error when calling diag()
* Now ensures that diag() creates 1 x 1 matrix when m = 1
3) Bug fix in basis.sph and penalty.sph
* Previously used Euclidean inner product to define angle
* Now uses correct inner product to define angle
4) New function: boot.ss() for bootstrapping a fit smoothing spline
* Default usage calculates bootstrap SEs and BCa CIs
* Plotting method exists for plotting the estimate w/ CIs
5) Major changes to spherical smoothing spline functionality
* Inputs changed from Euclidean to spherical coordinates
* Penalty order changed from non-standard to conventional
* Changes affect basis.sph, penalty.sph, sm, and gsm
6) Internal improvements to the ss() function
* Added xmin and xmax arguments to ss() function
* Previously required length(unique(x)) >= length(knots)
7) Added argument "ci" to the plotci() function
* Allows user to input matrix of CI bounds for plotting
* Used by plot.boot.ss() to plot bootstrap CI estimates
8) Added documentation for the plot.ss() and plot.boot.ss() functions
* Can be used to plot a smoothing spline fit with CI
* plot.ss() uses Bayesian CI, and plot.boot.ss() uses bootstrap CI
9) Added functions for computing weighted means, variance, and quantiles
* wtd.mean() computes the weighted (and trimmed) mean
* wtd.var() computes weighted variance (wtd.sd() is weighted SD)
* wtd.quantile() computes weighted sample quantiles
Changes: ver 1.0-6 (2021-04-22)
1) varimp: new function for variable importance indices
* Calculates importance index for each term in smooth model
* Partitions importance into parametric and nonparametric components
2) bin.sample: new function for bin sampling observations (for spline knots)
* Bin multidimensional data and randomly sample w/in each bin
* Options to return bin indices and/or breaks defining bins
3) sm and gsm knot sampling changes (improvements) for all options
* Now uses type = 2 quantiles for continuous predictors (instead of type = 7)
* Unless knots are provided, bin.sample generates knots for 13 or fewer predictors
4) Added "ridge" parameterization for all basis functions
* Basis matrix is post-multiplied by inverse square root of penalty matrix
* Penalty matrix is identity matrix when using ridge parameterization
5) plotci improvements
* Added col argument (for lines and points)
* Can now add factors without axes warning
6) theta.mle and gsm improvements for NegBin with unknown theta
* Stabilized iterative algorithm to avoid Inf estimates
* Estimated theta now must be less than .Machine$double.xmax
7) More flexibility for names of basis and penalty functions
* Now can use "." instead of "_" for any basis or penalty function
* Ex: basis.poly() is equivalent to basis_poly()
Changes: ver 1.0-5 (2020-11-30)
1) Bug fix for summary.gsm regarding p-values for smooth terms
* Previously returned incorrect chi-square and p-values
* Now uses correct chi-square (or F-test) and p-values
2) Bug fix for penalty_tps with two-dimensional predictor
* Previously used is.na() instead of is.infinite() resulting in NaN
* Thanks to Joseph Antonelli at Florida for discovering the bug
3) Improvements to pseudo-significance testing for smooth terms
* Previously allowed for df < 1, which could result in artificially
small p-values for effect functions with df < 1
* Now uses pmax(df,1) for significance tests to avoid this issue
4) New argument "df" for the "sm" function (supplement to "spar" and "lambda").
* Fits a smooth with a specified equivalent degrees of freedom.
* Equivalent degrees of freedom = the trace of the smoother matrix.
5) New argument "bernoulli" to the "basis_poly", "penalty_poly" and "ss" functions
* If TRUE (default) uses scaled Bernoulli polynomials for kernel
* If FALSE produces classic definition of smoothing spline
6) Internal improvements for "gsm" with family = NegBin and unknown theta
* Previously used nlm function to optimize the log-likelihood
* Now uses theta.mle function, which is faster and more stable
7) Internal improvements for "psolve" when checking symmetry of a
* Previously used isSymmetric(a) to check for symmetry
* Now uses isSymmetric(unname(a)) to check for symmetry
8) Added DOI hyperlink for Helwig (2020+) JCGS
Changes: ver 1.0-4 (2020-08-09)
1) Bug fix in "gsm" with family = NegBin regarding SE calculation
* Previously multiplied the se.lp by sqrt(1/theta)
* Now correctly uses dispersion parameter of one
2) Bug fix in "gsm" with family = NegBin and user supplied spar/lambda
* Previously resulted in error due to lack of defining est.theta
* Now correctly estimates theta with a fixed lambda
3) Added more tuning possibilities for "gsm" function
* PQL (penalized quasi-likelihood) tuning is now available
* GACV and ACV tuning are now available for non-canonical links
4) Internal improvements to "gsm" for family = NegBin
* Added suppressWarnings() to eliminate warnings from nlm
* Added use of tryCatch to handle any errors product by nlm
5) Added new reference: Helwig (2020+) JCGS
Changes: ver 1.0-3 (2020-07-06)
1) Bug fix in "gsm" with user supplied weights
* Previously used weights for likelihood evaluation but not fitting
* Now uses correct weights for IRPLS algorithm fitting
2) Bug fix in "check_control"
* Previously only allowed for searching spar between 0 and 1
* Now allows for any bounds that satisfy lower < upper
3) Bug fix in "print" for models with fixed spar / lambda
* Previously didn't save method and printed GCV criterion
* Now prints correct criterion when spar / lambda is provided
4) Bug fix in "summary.gsm" for models with nominal variables that have 2 levels
* Previously resulted in an error during the SE calculation
* Now correctly calculates SE for nominal variables have 2 levels
5) Post-processing of GCV and OCV for "gsm" with gaussian response
* Previously returned non-constant portion of GCV / OCV
* Now matches "sm" output: cv.crit.new = 2*cv.crit.old + mean(y^2)
6) Internal computational improvements to "gsm" function
* Previously tuned model and then refit w/ optimal parameters
* Now tuning returns all relevant output w/o refitting
7) Slight update to package name (to clarify "nonparametric regression")
* Previous name: Nonparametric Regression
* Updated name: Nonparametric Regression via Smoothing Splines
Changes: ver 1.0-2 (2020-05-04)
1) Bug fix in "summary.gsm" for models with null space dimension of one
* Previously resulted in an error during the SE calculation
* Now correctly calculates the null space SE with nsdf == 1
2) Bug fix in "summary.gsm" for binomial with factor response variable
* Previously resulted in an error when calculating deviance residuals
* Now correctly calculates deviance residuals with factor responses
3) Bug fix in "predict.sm" and "predict.gsm" for multi-dimensional thin-plates
* Previously resulted in an error when checking new data
* Now correctly checks new data and creates predictions
4) Bug fix in "pred_rkhs" (internal function) which affected TPS predictions
* Previously resulted in error due to lack of initializing Qcont
* Now correctly initializes Qcont, which avoids the error
5) Improvements to "plotci" function for plotting 'x' as a factor
* Previously converted factors to integers for plotting
* Now plots factors with points and error bars (default)
6) Updates to references (added details for Helwig SAGE RMF entry)
Changes: ver 1.0-1 (2019-12-09)
1) Improvement to "gsm" function for binomial responses
* Now allows the response variable to be a factor
* First level is a failure, and others are successes
2) Bug fix in "build_rkhs" for parametric effects of factors
* Previously provided incorrect namespace to model.matrix
* Now correctly forms model.matrix for parametric factors
3) Bug fix in "sm" and "gsm" for tprk = FALSE and rank deficient knots
* Previously produced an error if 1 unique knot per predictor
* Now correctly computes solution in such cases
4) Bug fix in "summary.gsm" for deviance residuals
* Previously was returning working residuals from fit object
* Now correctly outputs the deviance residuals from summary
5) Bug fix in "ss" and "summary.ss" for models with m = 1 and/or and periodic = TRUE
* Previously resulted in an error during post-processing
* Now correctly post-processes the result with m = 1 and/or periodic = TRUE
6) Improvement to knot selection method for "ss" when all.knots = FALSE
* Previously used quantiles of x (instead of observed x)
* Now uses the observed x values to ensure a "true" smoothing spline
7) Bug fix in "sm" and "summary.sm" for models with null space dimension of one
* Previously resulted in an error during post-processing
* Now correctly post-processes the result with nsdf == 1
8) Improvement to "plot.ss" for models with non-equidistant x values
* Previously fit and CI were plotted at observed x values
* Now fit and CI are plotted at equidistant x values
9) Updates to references (added Helwig SAGE RMF entry)