SpecifyCoefficient            package:cmm            R Documentation

_S_p_e_c_i_f_y_C_o_e_f_f_i_c_i_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     Gives the generalized exp-log specification for various
     coefficients

_U_s_a_g_e:

     SpecifyCoefficient(name, arg, rep=1)

_A_r_g_u_m_e_n_t_s:

    name: character: name of desired coefficient

     arg: an argument specific to the coefficient, e.g., a vector of
          scores or number of rows and colums. 

     rep: number of repetitions of the coefficient

_D_e_t_a_i_l_s:

     Currently the following coefficients are implemented:


      SpecifyCoefficient("Mean",scores)
      SpecifyCoefficient("Variance",scores)
      SpecifyCoefficient("StandardDeviation",scores)
      SpecifyCoefficient("GiniMeanDifference",scores)
      SpecifyCoefficient("Entropy",k)
      SpecifyCoefficient("DiversityIndex",k)
      SpecifyCoefficient("Covariance",list(xscores,yscores))
      SpecifyCoefficient("Correlation",list(xscores,yscores))
      SpecifyCoefficient("KendallTau",list(r,c))
      SpecifyCoefficient("GoodmanKruskalGammma",list(r,c))
      SpecifyCoefficient("CohenKappa",r)
      SpecifyCoefficient("DifferenceInProportions",m)
      SpecifyCoefficient("LogOddsRatio",)
      SpecifyCoefficient("LoglinearParameters",dim)
      SpecifyCoefficient("Probabilities",dim)
      SpecifyCoefficient("LogProbabilities",dim)

     SpecifyCoefficient("ConditionalProbabilities",list(var,condvar,dim))

     Here,  'scores' is a score vector, e.g., 'c(1,2,3,4,5)'; 'k' is
     the number of cells in a table; 'r' is the number of rows and
     columns of a square table; 'dim' is the dimension of the table.
     '"LoglinearParameters"' gives the highest order loglinear
     parameters (loglinear parameters can also be obtained as output of
     'SampleStatistics', 'ModelStatistics' or 'MarginalModelFit' by
     setting 'ShowParameters=TRUE' and the coefficients equal to log
     probabilities.

_V_a_l_u_e:

     output is of the form 'list(matlist,funlist)' where 'matlist' is a
     list of matrices and 'funlist' is a list of function names, which
     can currently be '"log"', '"exp"', '"identity"', '"xlogx"' (i.e.,
     f(x) = x log(x)),  '"xbarx"' (i.e., f(x)=x(1-x)), '"sqrt"'

_A_u_t_h_o_r(_s):

     W. P. Bergsma w.p.bergsma@lse.ac.uk

_R_e_f_e_r_e_n_c_e_s:

     Bergsma, W. P. (1997). _Marginal models for categorical data_.
     Tilburg, The Netherlands: Tilburg University Press. <URL:
     http://stats.lse.ac.uk/bergsma/pdf/bergsma_phdthesis.pdf>

     Bergsma, W. P., Croon, M. A., & Hagenaars, J. A. P. (2009).
     Marginal models for dependent, clustered, and longitudunal
     categorical data. Berlin: Springer.

_S_e_e _A_l_s_o:

     'ConstraintMatrix', 'DesignMatrix', 'MarginalMatrix'

_E_x_a_m_p_l_e_s:

        SpecifyCoefficient("Mean",c(1,2,3))
        SpecifyCoefficient("Variance",c(1,2,3))
        SpecifyCoefficient("StandardDeviation",c(1,2,3))
        SpecifyCoefficient("GiniMeanDifference",c(1,2,3))
        SpecifyCoefficient("Entropy",5)
        SpecifyCoefficient("DiversityIndex",5)
        SpecifyCoefficient("Covariance",list(c(1,2,3),c(1,2,3)))
        SpecifyCoefficient("Correlation",list(c(1,2,3),c(1,2,3)))
        SpecifyCoefficient("KendallTau",list(3,4))
        SpecifyCoefficient("GoodmanKruskalGammma",list(3,4))
        SpecifyCoefficient("CohenKappa",3)
        SpecifyCoefficient("DifferenceInProportions",1)
        SpecifyCoefficient("LogOddsRatio",1)
        SpecifyCoefficient("LoglinearParameters",c(3,3))
        SpecifyCoefficient("Probabilities",8)
        SpecifyCoefficient("LogProbabilities",8)
        # conditional probabilities for 3x3 table, conditioning on first variable
        SpecifyCoefficient("ConditionalProbabilities",list(c(1,2),c(1),c(3,3)))

