partition             package:hier.part             R Documentation

_H_i_e_r_a_r_c_h_i_c_a_l _p_a_r_t_i_t_i_o_n_i_n_g _f_r_o_m _a _l_i_s_t _o_f _g_o_o_d_n_e_s_s _o_f _f_i_t _m_e_a_s_u_r_e_s

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

     Partitions variance in a multivariate dataset from a list of
     goodness of fit measures

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

     partition(gfs, pcan, var.names = NULL)

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

     gfs: an array as outputted by the function 'all.regs' or a vector
          of goodness of fit measures from a hierarchy of regressions
          based on pcan variables in ascending order (as produced by
          function 'combos', but also including the null model as the
          first element) 

    pcan: the number of variables from which the hierarchy was
          constructed (maximum = 12) 

var.names: an array of pcan variable names, if required 

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

     This function applies the hierarchical partitioning algorithm of
     Chevan and Sutherland (1991) to return a simple table listing of
     each variable, its independent contribution (I) and its conjoint
     contribution with all other variables (J).  The output is
     identical to the function 'hier.part', which takes the dependent
     and independent variable data as its input.

     Note earlier versions of partition (hier.part<1.0) produced a
     matrix and barplot of percentage distribution of effects as a
     percentage of the sum of all Is and Js, as portrayed in Hatt et
     al. (2004) and Walsh et al. (2004). This version plots the
     percentage distribution of independent effects only. The sum of Is
     equals the goodness of fit measure of the full model minus the
     goodness of fit measure of the null model.

     The distribution of joint effects shows the relative contribution
     of each variable to shared variability in the full model. Negative
     joint effects are possible for variables that act as suppressors
     of other variables (Chevan and Sutherland 1991).

     At this stage, the partition routine will not run for more than 12
     independent variables. This function requires the gtools package
     in the gregmisc bundle

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

     a list containing 

     gfs: a data frame listing all combinations of independent
          variables in the first column in ascending order, and the
          corresponding goodness of fit measure for the model using
          those variables 

      IJ: a data frame of I, the independent and J the joint
          contribution for each independent variable 

  I.perc: a data frame of I as a percentage of total explained variance 

  J.perc: a data frame of J as a percentage of sum of all Js 

_N_o_t_e:

     The function produces a minor rounding error for hierarchies
     constructed from more than 9 variables. To check if this error
     affects the inference from an analysis, run the analysis several
     times with the variables entered in a different order.  There are
     no known problems for hierarchies with 9 or fewer variables.

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

     Chris Walsh Chris.Walsh@sci.monash.edu.au using c and fortran code
     written by Ralph Mac Nally Ralph.MacNally@sci.monash.edu.au.

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

     Chevan, A. and Sutherland, M. 1991 Hierarchical Partitioning. _The
     American Statistician_ *45*, 90-96.

     Hatt, B. E., Fletcher, T. D., Walsh, C. J. and Taylor, S. L. 2004
     The influence of urban density and drainage infrastructure on the
     concentrations and loads of pollutants in small streams.
     _Environmental Management_ *34*, 112-124.

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

     'all.regs', 'partition', 'rand.hp'

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

                #linear regression of log(electrical conductivity) in streams
                #against seven independent variables describing catchment
                #characteristics (from Hatt et al. 2004)
                data(urbanwq)
                env <- urbanwq[,2:8]
                gofs <- all.regs(urbanwq$lec, env, fam = "gaussian",
                gof = "Rsqu", print.vars = TRUE)
                partition(gofs, pcan = 7, var.names = names(urbanwq[,2,8]))

                #hierarchical partitioning of logistic and linear regression
                #goodness of fit measures from Chevan and Sutherland (1991) 
                data(chevan)
                partition(chevan$chisq, pcan = 4)
                partition(chevan$rsqu, pcan = 4)

