coef.dfrr: Get estimated coefficients from a dfrr fit

Description Usage Arguments Details See Also Examples

View source: R/coef.dfrr.R

Description

Returns estimations of the smooth functional regression coefficients β(t). The result is a matrix of either Fourier coefficients or evaluations. See Details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'dfrr'
coef(
  object,
  standardized = NULL,
  unstandardized = !standardized,
  return.fourier.coefs = NULL,
  return.evaluations = !return.fourier.coefs,
  time_to_evaluate = NULL,
  ...
)

Arguments

object

a dfrr-object

standardized, unstandardized

a boolean indicating whether stanadrdized/unstandardized regression coefficients are reported. Only standardized regression coefficients are identifiable, thus the arugment is defaults to standardized=TRUE.

return.fourier.coefs, return.evaluations

a boolean indicating whether the Fourier coefficients of regression coefficients are returned (return.fourier.coefs=TRUE), or evaluations of the regression coefficients (return.evaluations=TRUE). Defaults to return.fourier.coefs=TRUE.

time_to_evaluate

a numeric vector indicating the set of time points for evaluating the functional regression coefficients, for the case of return.evaluations=TRUE.

...

dot argument, just for consistency with the generic function

Details

This function will return either the Fourier coefficients or the evaluation of estimated coefficients. Fourier coefficients which are reported are based on the a set of basis which can be determined by basis(dfrr_fit). Thus the evaluation of regression coefficients on the set of time points specified by vector time, equals to fitted(dfrr_fit)%*%t(eval.basis(time,basis(dfrr_fit))).

Consider that the unstandardized estimations are not identifiable. So, it is recommended to extract and report the standardized estimations.

See Also

plot.coef.dfrr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(2000)
N<-50;M<-24

X<-rnorm(N,mean=0)
time<-seq(0,1,length.out=M)
Y<-simulate_simple_dfrr(beta0=function(t){cos(pi*t+pi)},
                        beta1=function(t){2*t},
                        X=X,time=time)
dfrr_fit<-dfrr(Y~X,yind=time)

coefs<-coef(dfrr_fit)
plot(coefs)

asgari-fatemeh/dfrr documentation built on Aug. 12, 2020, 3:06 a.m.