Learn R Programming

frechet (version 0.3.0)

GloSpheReg: Global Fréchet Regression for Spherical Data

Description

Global Fréchet regression for spherical data with respect to the geodesic distance.

Usage

GloSpheReg(xin = NULL, yin = NULL, xout = NULL)

Value

A list containing the following components:

xout

Input xout.

yout

A \(k\)-by-\(m\) matrix holding the fitted responses, of which each row is a spherical vector, corresponding to each element in xout.

xin

Input xin.

yin

Input yin.

Arguments

xin

A vector of length \(n\) or an \(n\)-by-\(p\) matrix with input measurement points.

yin

An \(n\)-by-\(m\) matrix holding the spherical data, of which the sum of squares of elements within each row is 1.

xout

A vector of length \(k\) or an \(k\)-by-\(p\) with output measurement points; Default: the same grid as given in xin.

References

Petersen, A., & Müller, H.-G. (2019). "Fréchet regression for random objects with Euclidean predictors." The Annals of Statistics, 47(2), 691--719.

Examples

Run this code
# \donttest{
n <- 101
xin <- seq(-1,1,length.out = n)
theta_true <- rep(pi/2,n)
phi_true <- (xin + 1) * pi / 4
ytrue <- apply( cbind( 1, phi_true, theta_true ), 1, pol2car )
yin <- t( ytrue )
xout <- xin
res <- GloSpheReg(xin=xin, yin=yin, xout=xout)
# }

Run the code above in your browser using DataLab