ACE: Alternating Conditional Expectations

View source: R/ACE5.R

ACER Documentation

Alternating Conditional Expectations

Description

The function ACE() uses the alternating conditional expectations algorithm to find a transformations of y and x that maximise the proportion of variation in y explained by x. It is a less general function than the ace() function of the package 'acepack' in that it takes only one explanatory variable. The function ACE() is used by the function mcor() to calculate the maximal correlation between x and y.

Usage

ACE(x, y, weights, data = NULL, con_crit = 0.001, 
    fit.method = c("loess", "P-splines"), nseg = 10, 
    max.df = 6, ...)
    
mcor(x, y, data = NULL,  fit.method = c("loess", "P-splines"),  
        nseg = 10, max.df = 6,  ...)

Arguments

x

the unique x-variables

y

the y-variable

weights

prior weights

data

a data frame for y, x and weights

con_crit

the convergence criterio of the algorithm

fit.method

the method use to fit the smooth functions $t_1()$ and $t_2()$

nseg

the number of knots

max.df

the maximum od df allowed

...

arguments to pass to the fitted functions fir_PB or loess()

Details

The function ACE is a simplified version of the function ace() of the package agepack.

Value

A fitted ACE model with methods print.ACE() and plot.ACE()

Author(s)

Mikis Stasinopoulos

References

Eilers, P. H. C. and Marx, B. D. (1996). Flexible smoothing with B-splines and penalties (with comments and rejoinder). Statist. Sci, 11, 89-121.

Rigby, R. A. and Stasinopoulos D. M.(2005). Generalized additive models for location, scale and shape, (with discussion),Appl. Statist., 54, part 3, pp 507-554.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07/.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

Stasinopoulos, M.D., Kneib, T., Klein, N., Mayr, A. and Heller, G.Z., (2024). Generalized Additive Models for Location, Scale and Shape: A Distributional Regression Approach, with Applications (Vol. 56). Cambridge University Press.

(see also https://www.gamlss.com/).

See Also

fit_PB

Examples

data(rent)
ACE(Fl, R, data=rent)
pp <- ACE(Fl, R, data=rent)
pp
plot(pp)
mcor(Fl, R, data=rent)

gamlss.ggplots documentation built on May 29, 2024, 1:34 a.m.