auc             package:PresenceAbsence             R Documentation

_A_r_e_a _U_n_d_e_r _t_h_e _C_u_r_v_e

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

     'auc' calculates the area under the ROC curve approximated with a
     Mann-Whitney U statistic, and (optionally) the associated standard
     deviation.

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

     auc(DATA, st.dev = TRUE, which.model = 1, na.rm = FALSE)

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

    DATA: a matrix or dataframe of observed and predicted values where
          each row represents one plot and where columns are:

                  DATA[,1]  plot ID                                            text
                  DATA[,2]  observed values                                    zero-one values
                  DATA[,3]  predicted probabilities from first model           numeric (between 0 and 1)
                  DATA[,4]  predicted probabilities from second model, etc...  

  st.dev: a logical indicating whether the associated standard
          deviation should be calculated 

which.model: a number indicating which model from DATA should be used

   na.rm: a logical indicating whether missing values should be removed

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

     'auc' approximates the area under the ROC curve with a
     Mann-Whitney U statistic (Delong et al., 1988) to calculate the
     area under the curve.

     The standard errors from 'auc' are only valid for comparing an
     individual model to random assignment (i.e. AUC=.5). To compare
     two models to each other it is necessary to account for
     correlation due to the fact that they use the same test set. If
     you are interested in pair wise model comparisons see the Splus
     ROC library from Mayo clinic. 'auc' is a much simpler function
     than what is available from the Splus ROC library from Mayo
     clinic. 

     The observed values (column 2 in 'DATA') can be given as 0/1
     values to represent 'absence' and 'presence'. If this column
     contains actual values (i.e. basal area, biomass, etc...), any
     value of zero will be treated as 'absence' and any value greater
     than zero will be treated as 'presence'.

     If observed values are all the same, in other words, if the data
     consists entirely of observed Presences or entirely of observed
     Absences, 'auc' will return 'NaN'.

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

     if 'st.dev' = FALSE, returns: 'AUC' area under the curve.

     if 'st.dev' = TRUE, returns a dataframe where:

       [1,1]  'AUC'     area under the curve
       [1,2]  'AUC.sd'  standard deviation of 'AUC'

_N_o_t_e:

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

     Elizabeth Freeman eafreeman@fs.fed.us

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

     DeLong, E.R., Delong, D.M. and Clarke-Pearson, D.L., 1988.
     Comparing areas under two or more correlated Receiver Operating
     Characteristic curves: a nonparametric approach. Biometrics,
     44(3):837-845.

     Splus ROC library developed by Beth Atkinson and Doug Mahoney at
     the Mayo Clinic is available at: <URL:
     http://mayoresearch.mayo.edu/mayo/research/biostat/splusfunctions.cfm>
     for Unix, and <URL: http://www.stats.ox.ac.uk/pub/MASS3/Winlibs/>
     for windows.

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

     'cmx', 'pcc', 'sensitivity', 'specificity', 'Kappa',
     'auc.roc.plot'

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

     data(SIM3DATA)

     auc(SIM3DATA)

     auc(SIM3DATA,st.dev=FALSE,which.model=2)

