calibrate             package:calibrate             R Documentation

_C_a_l_i_b_r_a_t_i_o_n _o_f _B_i_p_l_o_t _a_n_d _S_c_a_t_t_e_r_p_l_o_t _A_x_i_s

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

     Routine for the calibration of any axis (variable vector) in a
     biplot or a scatterplot

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

     calibrate(g,y,tm,Fr,tmlab=tm,tl=0.05,dt=TRUE,dp=FALSE,lm=TRUE,verb=TRUE,axislab="",reverse=FALSE,shift=0,alpha=NULL,labpos=1,weights=diag(rep(1,length(y))),axiscol="blue",cex.axislab=0.75,graphics=TRUE,where=3,laboffset=c(0,0),m=matrix(c(0,0),nrow=1),markerpos=3,showlabel=TRUE)

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

       g: the vector to be calibrated (2 x 1). 

       y: the data vector corresponding to 'g', appropriately centred
          and/or standardized. 

      tm: the vector of tick marks, appropiately centred and/or scaled. 

      Fr: the coordinates of the rows markers in the biplot. 

   tmlab: a list or vector of tick mark labels. 

      tl: the tick length. By default, the tick markers have length
          0.05.

      dt: draw ticks. By default, ticks markers are drawn. Set dt=F in
          order to compute calibration results without actually drawing
          the calibrated scale. 

      dp: drop perpendiculars. With dp=T perpendicular lines will be
          drawn from the row markers  specified by Fr onto the
          calibrated axis. This is a graphical aid to read off the
          values in the corresponding scale. 

      lm: label markers. By default, all tick marks are labelled.
          Setting lm=F turns off the labelling of the tick marks. This
          allows for creating tick marks without labels. It is
          particularly useful for creating finer scales of tickmarks
          without labels.

    verb: verbose parameter (F=be quiet, T=show results). 

 axislab: a label for the calibrated axis. 

 reverse: puts the tick marks and tick mark labels on the other side of
          the axis. 

   shift: a scalar that shifts the calibrated axis by a fixed distance. 

   alpha: a value for the calibration factor. This parameter should
          only be specified if a calibration is required that is
          different from the one that is optimal for data recovery.

  labpos: position of the label for the calibrated axis (1,2,3 or 4). 

laboffset: offset vector for the axis label. If specified, shifts the
          label by the specified amounts with respect to the current
          position. 

 weights: a matrix of weights (optional).  

 axiscol: color of the calibrated axis. 

cex.axislab: character expansion factor for axis label and tick mark
          labels. 

graphics: do graphics or not (F=no graphical output, T=draws calibrated
          scale). 

   where: label placement (1=beginning,2=middle,3=end). 

       m: vector of means. 

markerpos: position specifier for the tick mark labels (1,2,3 or 4). 

showlabel: show axis label in graph (T) or not (F). 

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

     This program calibrates variable vectors in biplots and
     scatterplots, by drawing tick marks along  a given the vector and
     labelling the tick marks with specified values. The optimal
     calibration is found by (generalized) least squares. Non-optimal
     calibrations are possible by specifying a  calibration factor
     (alpha).

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

     Returns a list with calibration results 

useralpha: calibration factor specified by the user

optalpha: optimal calibration factor

lengthoneunit: length in the plot of one unit in the scale of the
          calibrated variable

     gof: goodness of fit (as in regression)

     gos: goodness of scale

       M: coordinates of the tick markers

     ang: angle in degrees of the biplot axis with the positive x-axis

      yt: fitted values for the variable according to the calibration

       e: errors according to the calibration

     Fpr: coordinates of the projections of the row markers onto the
          calibrated axis

      Mn: coordinates of the tick marker end points

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

     Jan Graffelman jan.graffelman@upc.edu

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

     Gower, J.C. and Hand, D.J., (1996) Biplots. Chapman & Hall, London

     Graffelman, J. and van Eeuwijk, F.A. (2005) Calibration of
     multivariate scatter plots for  exploratory analysis of relations
     within and between sets of variables in genomic research
     Biometrical Journal, 47(6) pp. 863-879.

     Graffelman, J. (2006) A guide to biplot calibration.

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

     'biplot'

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

     x <- rnorm(20,1)
     y <- rnorm(20,1)
     x <- x - mean(x)
     y <- y - mean(y)
     z <- x + y
     b <- c(1,1)
     plot(x,y,asp=1,pch=19)
     tm<-seq(-2,2,by=0.5)
     Calibrate.z <- calibrate(b,z,tm,cbind(x,y),axislab="Z",graphics=TRUE)

