olfreg | R Documentation |
Functional ordinal logistic regression model in which the response variable is a factor variable whereas the independent variables are functional variables. Independent variables could also be scalar variables.
olfreg(formula, betalist = NULL)
formula |
a formula expression of the form |
betalist |
an optional argument. A list which contains beta regression coefficient functions for independent variables. If betalist is not provided, the number of estimated beta regression coefficient functions for one functional covariate would equal the number of basis functions used to represent that functional covariate. For a scalar variable, beta regression coefficient function is also a functional object whose basis is constant. Needless to say, for a scalar variable, there will be one beta regression coefficient. |
call |
call of the olfreg function |
x.count |
number of predictors |
xfdlist |
a list of functional data objects. The length of the list is equal to the number of predictors |
betalist |
a list of beta regression coefficient functions |
coefficients |
estimated beta regression coefficient functions |
alpha |
estimated intercepts which represent boudaries of categories of dependent factor variable |
ylev |
a number of categories of a response variable |
fitted.values |
fitted probabilities of a dependent factor variable |
loglik |
a value of log-likelihood function at optimum |
grd |
a vector of gradient values at optimum |
Hess |
Hessian matrix at optimum |
df |
degrees of freedom |
AIC |
Akaike information criterion |
iteration |
number of iterations of Fisher Scoring algorithm needed for convergence |
# cycling dataset library(fda) # creation of ordinal variable from HR variable zoneHR=rep(0,216) zoneHR[which(rowMeans(cycling$HR[,1:60])<107)]=1 zoneHR[which((rowMeans(cycling$HR[,1:60])<125)&(rowMeans(cycling$HR[,1:60])>107))]=2 zoneHR[which((rowMeans(cycling$HR[,1:60])<142)&(rowMeans(cycling$HR[,1:60])>125))]=3 zoneHR[which((rowMeans(cycling$HR[,1:60])<160)&(rowMeans(cycling$HR[,1:60])>142))]=4 zoneHR[which((rowMeans(cycling$HR[,1:60])>160))]=5 # first functional variable - power (WATTS) watts = t(cycling$WATTS[,1:60]) # set up a fourier basis system due to its cycling pattern xbasis = create.fourier.basis(c(1,60),5) # 5 basis functions for example watts.fd = smooth.basis(c(1:60),watts,xbasis)$fd zoneHR = as.factor(zoneHR) formula = zoneHR ~ watts.fd olfreg.model = olfreg(formula = formula) # additional functional variable - cadence (CAD) cad = t(cycling$CAD[,1:60]) # set up a functional variable for cad xbasis2 = create.bspline.basis(c(1,60), nbasis = 5, norder = 4) cad.fd = smooth.basis(c(1:60),cad,xbasis2)$fd formula = zoneHR ~ watts.fd + cad.fd olfreg.model = olfreg(formula = formula)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.