FastCUB (version 0.0.2)

bestcub: Best-subset variable selection for CUB models via fast EM algorithm

Description

Perform a best-subset search for CUB models on the basis of the BIC index, by combining all possible covariates' specification for feeling and for uncertainty parameters

Usage

bestcub(ordinal,m,Y,W,toler=1e-4,maxiter=200,iterc=5,alpha=0.05,mix=FALSE,
tolmix=1e+2,fmix=NULL,invgen=TRUE,verbose=FALSE)

Value

A list containing the following results:

vsel

List of all estimated models (with the accelerated EM) as FastCUB objects

bestmodel

FastCUB object corresponding to the best CUB model (according to BIC), if not null

bestW

Names of covariates for feeling in the best model with all significant effect

bestY

Names of covariates for feeling in the best model with all significant effect

param

ML estimates of the best model

se

Estimated standard errors for the best model

bic

BIC index of the best (significant) model

mattime

Matrix of computational time for each of the estimated model

matiter

Matrix of number of iterations occurred for each of the estimated model

Arguments

ordinal

Vector of ordinal responses

m

Number of ordinal categories

Y

Matrix of selected covariates for the uncertainty parameter

W

Matrix of selected covariates for the feeling parameter

toler

Fixed convergence tolerance for final estimates

maxiter

Maximum number of iterations allowed for running the optimization algorithm

iterc

Iteration from which the acceleration strategy starts

alpha

Significant level for Wald test

mix

Logical: should a first preliminary standard EM be run at toler equal to tolmix? (default is FALSE)

tolmix

Convergence tolerance for first preliminary EM (if mix=TRUE).

fmix

Fraction of iteration needed for first preliminary EM (if mix=TRUE). Default is null.

invgen

Logical: should the recursive formula for the inverse of the information matrix be considered? (Default is TRUE)

verbose

Logical: should messages about acceleration steps be printed out? (Default is FALSE)

See Also

fastCUB

Examples

Run this code
# \donttest{
library(FastCUB)
data(univer)
ordinal<-univer$global
m<-7
Y<-univer[,c(2,3,4)]
W<-univer[,8:11]
## Search for the best CUB model with covariates only for feeling
best0q<-bestcub(ordinal,m,Y=NULL,W,toler=1e-4,maxiter=100,iterc=5,alpha=0.05,invgen=TRUE)
## Search for the best CUB model with covariates only for uncertainty
bestp0<-bestcub(ordinal,m,Y,W=NULL,toler=1e-4,maxiter=100,iterc=5,alpha=0.05,invgen=TRUE)
## Search for the best CUB model with covariates for both parameters
bestpq<-bestcub(ordinal,m,Y,W,toler=1e-4,maxiter=100,iterc=5,alpha=0.05,invgen=TRUE,
    mix=TRUE,tolmix=1e+3,fmix=1)
final<-bestpq$bestmodel; summary(final)
# }

Run the code above in your browser using DataLab