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 the 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. It uses 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., 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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/9780429298547")}.

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1201/b21973")}

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 Sept. 3, 2023, 5:08 p.m.