attribute            package:verification            R Documentation

_A_t_t_r_i_b_u_t_e _p_l_o_t

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

     An attribute plot  illustrates the reliability, resolution and
     uncertainty of a forecast with respect to the observation. The
     frequency of binned forecast probabilities are plotted against
     proportions of binned observations.  A perfect forecast would be
     indicated by a line plotted along the 1:1 line.  Uncertainty is
     described as the vertical distance between this point and the 1:1
     line.  The relative frequency for each forecast value is displayed
     in parenthesis.

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

     ## Default S3 method:
     attribute(x, obar.i,  prob.y = NULL, obar = NULL, class =
     "none", main = NULL, CI = FALSE, n.boot = 100, alpha = 0.05, tck = 0.01, freq = TRUE, ...)
     ## S3 method for class 'prob.bin':
     attribute(x, ...)
            

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

       x: A vector of forecast probabilities or a ``prob.bin'' class
          object produced by the 'verify' function. 

  obar.i: A vector of observed relative frequency of forecast bins.

  prob.y: Relative frequency of forecasts of forecast bins. 

    obar: Climatological or sample mean of observed events.

   class: Class of object.  If prob.bin, the function will use the data
          to estimate confidence intervals.

    main: Plot title.

      CI: Confidence Intervals. This is only an option if the data is
          accessible by using the verify command first. Calculated by
          bootstrapping the observations and prediction, then
          calculating PODy and PODn values.  

  n.boot: Number of bootstrap samples.

   alpha: Confidence interval.  By default = 0.05

     tck: Tick width on confidence interval whiskers.

    freq: Should the frequecies be plotted. Default = TRUE

     ...: Graphical parameters

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

     Matt Pocernich <pocernic@rap.ucar.edu>

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

     Hsu, W. R., and A.H. Murphy, 1986: The attributes diagram: A
     geometrical framework for assessing the quality of probability
     forecasts.  _Int. J. Forecasting_ *2*, 285-293.

     Wilks, D. S. (2005) _Statistical Methods in the Atmospheric
     Sciences _ Chapter 7, San Diego: Academic Press.

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

     'verify'

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

     ## Data from Wilks, table 7.3 page 246.
      y.i   <- c(0,0.05, seq(0.1, 1, 0.1))
      obar.i <- c(0.006, 0.019, 0.059, 0.15, 0.277, 0.377, 0.511, 
                  0.587, 0.723, 0.779, 0.934, 0.933)
      prob.y<- c(0.4112, 0.0671, 0.1833, 0.0986, 0.0616, 0.0366,
                 0.0303,  0.0275, 0.245, 0.022, 0.017, 0.203) 
      obar<- 0.162
      
     attribute(y.i, obar.i, prob.y, obar, main = "Sample Attribute Plot")  

     ## Function will work with a ``prob.bin'' class objects as well.
     ## Note this is a random forecast.
     obs<- round(runif(100))
     pred<- runif(100)

     A<- verify(obs, pred, frcst.type = "prob", obs.type = "binary")
     attribute(A, main = "Alternative plot", xlab = "Alternate x label" )
     ## to add a line from another model
     obs<- round(runif(100))
     pred<- runif(100)

     B<- verify(obs, pred, frcst.type = "prob", obs.type = "binary")
     lines.attrib(B, col = "green")

     ## Same with confidence intervals
     attribute(A, main = "Alternative plot", xlab = "Alternate x label", CI =
     TRUE)

     #### add lines to plot
     data(pop)
     pop.convert() ## internal function used to make binary observations for the pop figure.
     ### note the use of bins = FALSE
      mod24 <- verify(d$obs_rain, d$p24_rain, bins = FALSE)

      mod48 <- verify(d$obs_rain, d$p48_rain, bins = FALSE)
     plot(mod24, freq = FALSE)

     lines.attrib(mod48, col = "green", lwd = 2, type = "b")

