-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlinmod.Rd
85 lines (77 loc) · 2.69 KB
/
linmod.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
\name{linmod}
\alias{linmod}
\title{
Fit Fully Functional Linear Model
}
\description{
A functional dependent variable \eqn{y_i(t)} is approximated by a single
functional covariate \eqn{x_i(s)} plus an intercept function \eqn{\alpha(t)},
and the covariate can affect the dependent variable for all
values of its argument. The equation for the model is
\deqn{y_i(t) = \beta_0(t) + \int \beta_1(s,t) x_i(s) ds + e_i(t)}
for \eqn{i = 1,...,N}. The regression function \eqn{\beta_1(s,t)} is a
bivariate function. The final term \eqn{e_i(t)} is a residual, lack of
fit or error term. There is no need for values \eqn{s} and \eqn{t} to
be on the same continuum.
}
\usage{
linmod(xfdobj, yfdobj, betaList, wtvec=NULL)
}
\arguments{
\item{xfdobj}{
a functional data object for the covariate
}
\item{yfdobj}{
a functional data object for the dependent variable
}
\item{betaList}{
a list object of length 2. The first element is a functional parameter
object specifying a basis and a roughness penalty for the intercept term.
The second element is a bivariate functional parameter object for the
bivariate regression function.}
\item{wtvec}{
a vector of weights for each observation. Its default value is NULL,
in which case the weights are assumed to be 1.
}
}
\value{
a named list of length 3 with the following entries:
\item{beta0estfd}{
the intercept functional data object.
}
\item{beta1estbifd}{
a bivariate functional data object for the regression function.
}
\item{yhatfdobj}{
a functional data object for the approximation to the dependent variable
defined by the linear model, if the dependent variable is functional.
Otherwise the matrix of approximate values.
}
}
\references{
Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009),
\emph{Functional data analysis with R and Matlab}, Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2005),
\emph{Functional Data Analysis, 2nd ed.}, Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2002),
\emph{Applied Functional Data Analysis}, Springer, New York.
}
\seealso{
\code{\link{bifdPar}},
\code{\link{fRegress}}
}
\source{
Ramsay, James O., Hooker, Giles, and Graves, Spencer (2009)
\emph{Functional Data Analysis in R and Matlab}, Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2005), \emph{Functional
Data Analysis, 2nd ed.}, Springer, New York.
Ramsay, James O., and Silverman, Bernard W. (2002), \emph{Applied
Functional Data Analysis}, Springer, New York
}
\examples{
#See the prediction of precipitation using temperature as
#the independent variable in the analysis of the daily weather
#data, and the analysis of the Swedish mortality data.
}
% docclass is function
\keyword{smooth}