classif.glm  R Documentation 
Computes functional classification using functional (and non functional) explanatory variables by basis representation.
The first item in the data
list is called "df" and is a data
frame with the response and non functional explanatory variables, as
glm
.
Functional covariates of class fdata
or fd
are introduced in
the following items in the data
list.
basis.x
is a list of
basis for represent each functional covariate. The basis object can be
created by the function: create.pc.basis
, pca.fd
create.pc.basis
, create.fdata.basis
o
create.basis
.
basis.b
is a list of basis for
represent each functional beta parameter. If basis.x
is a list of
functional principal components basis (see create.pc.basis
or
pca.fd
) the argument basis.b
is ignored.
classif.glm( formula, data, family = binomial(), weights = "equal", basis.x = NULL, basis.b = NULL, type = "1vsall", prob = 0.5, CV = FALSE, ... )
formula 
an object of class 
data 
List that containing the variables in the model. 
family 
a description of the error distribution and link function to
be used in the model. This can be a character string naming a family
function, a family function or the result of a call to a family function.
(See 
weights 
Weights:

basis.x 
List of basis for functional explanatory data estimation. 
basis.b 
List of basis for functional beta parameter estimation. 
type 
If type is 
prob 
probability value used for binari discriminant. 
CV 
=TRUE, Crossvalidation (CV) is done. 
... 
Further arguments passed to or from other methods. 
Return glm
object plus:
formula
formula.
data
List that containing the variables in the model.
group
Factor of length n
group.est
Estimated vector groups
prob.classification
Probability of correct classification by group.
prob.group
Matrix of predicted class probabilities. For each
functional point shows the probability of each possible group membership.
max.prob
Highest probability of correct classification.
If the formula only contains a non functional explanatory variables
(multivariate covariates), the function compute a standard glm
procedure.
Manuel FebreroBande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es
Ramsay, James O., and Silverman, Bernard W. (2006), Functional Data Analysis, 2nd ed., Springer, New York.
McCullagh and Nelder (1989), Generalized Linear Models 2nd ed. Chapman and Hall.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S, New York: Springer. Regression for R. R News 1(2):2025
See Also as: fregre.glm
.
classif.gsam
and classif.gkam
.
## Not run: data(phoneme) ldat < ldata("df" = data.frame(y = phoneme[["classlearn"]]), "x" = phoneme[["learn"]]) a1 < classif.glm(y ~ x, data = ldat) summary(a1) newldat < ldata("df" = data.frame(y = phoneme[["classtest"]]), "x" = phoneme[["test"]]) p1 < predict(a1,newldat) table(newldat$df$y,p1) sum(p1==newldat$df$y)/250 ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.