Learn R Programming

CUB (version 1.1.5)

inibestcubecsi: Preliminary estimates of parameters for CUBE models with covariates only for feeling

Description

Compute preliminary parameter estimates of a CUBE model with covariates only for feeling, given ordinal responses. These estimates are set as initial values to start the corresponding E-M algorithm within the package.

Usage

inibestcubecsi(m,ordinal,W,starting,maxiter,toler)

Value

A vector (pai, gamaest, phi), where pai is the initial estimate for the uncertainty parameter, gamaest is the vector of initial estimates for the feeling component (including an intercept term in the first entry), and phi is the initial estimate for the overdispersion parameter.

Arguments

m

Number of ordinal categories

ordinal

Vector of ordinal responses

W

Matrix of selected covariates to explain the feeling component

starting

Starting values for preliminary estimation of a CUBE without covariate

maxiter

Maximum number of iterations allowed for preliminary iterations

toler

Fixed error tolerance for final estimates for preliminary iterations

Details

Preliminary estimates for the uncertainty and the overdispersion parameters are computed by short runs of EM. As to the feeling component, it considers the nested CUB model with covariates and calls inibestgama to derive initial estimates for the coefficients of the selected covariates for feeling.

See Also

inibestcube, inibestcubecov, inibestgama

Examples

Run this code
data(relgoods)
isnacov<-which(is.na(relgoods$Gender))
isnaord<-which(is.na(relgoods$Tv))
na<-union(isnacov,isnaord)
ordinal<-relgoods$Tv[-na]; W<-relgoods$Gender[-na]
m<-10
starting<-rep(0.1,3)
ini<-inibestcubecsi(m,ordinal,W,starting,maxiter=100,toler=1e-3)
nparam<-length(ini)
pai<-ini[1]                 # Preliminary estimates for uncertainty component
gamaest<-ini[2:(nparam-1)]  # Preliminary estimates for coefficients of feeling covariates
phi<-ini[nparam]            # Preliminary estimates for overdispersion component

Run the code above in your browser using DataLab