plotsummary: Summary plots of transforms

View source: R/Equitable_Transform.R

plotsummaryR Documentation

Summary plots of transforms

Description

Plots of various output from a transform: shows both Equitable and Least squares results Will compare them to the original data and to a signal is it is available Various formats for displaying the dat are used including images, contours and row/column plots with error bars shown (Because many plots are produced you may want to put the plots into a pdf file (foo) using pdf(file=foo)) before and dev.off() after using the function plotsummary )

Usage

plotsummary(
  Td_noise,
  Td = NULL,
  Td_old = NULL,
  row_unit = NULL,
  col_unit = NULL,
  z_unit = NULL,
  yline = 3,
  yma = 5,
  fintersect = FALSE,
  fsquares = FALSE,
  fpca = TRUE,
  fave = FALSE,
  fall = FALSE,
  inc = NULL,
  plim = NULL
)

Arguments

Td_noise

Output from the transform function transformE fro the data to be studied

Td

NULL(Default) Output from the transform program for an underlying signal. Allows comparisons with undelrlying signal

Td_old

ignore

row_unit

name for the row dimension for axis plotting e.g. "Day number"

col_unit

name for the row dimension for axis plotting e.g. "Year"

z_unit

name for the measured quantity e.g. "Temperature"

yline

3 (default) number of lines from image to start ylabel

yma

5 (default) distance in from margin to start images

fintersect

FALSE (default) TRUE: plots intercept vs 1-slope for different zeroes

fsquares

TRUE (default) line p[lots] produced of slope and shift square matrices

fave

FALSE (default) TRUE: shows results with errors of performing averaging ion data

fall

FALSE (default) TRUE: all "events are used to construct bagplots when finterswect is also TRUE

inc

NULL(default) 10 colums plotted : inc when set is the increment in columns that the plots step through

Value

None

Examples

# first create a data set d and create the associated transforms.
# In this case d is eg7 with a resolution 3x higher than the lowest
#consider putting the graphs into a pdf file  by bracketing your
#commands beginning with pdf(file="foo.pdf) and ending with dev.off()
#(includes last column as average
# sequence profile : use Ave=FALSE to eliminate this column )
d<-eg7(3,3);Td<-transformE(d)
#when the data is perfectly equitable many plots
#are identical for the different transforms
plotsummary(Td)
#points (even for average profile) have no error
# in perfectly equitable system as they are specified by f,g, and u
plotsummary(Td,fave=TRUE)
               #add noise to this signal data set
#find the std dev of the overall signal and add normally distributed noise
sdd<-sd(d,na.rm=TRUE)
# that has a std. dev that is some fraction (fac) of this signal std dev
#set the fraction of noise relative to the standard deviaiton of the signal
fac<-1/3
#add to signal a normal distribution of noise with this std dev.
d_noise<-d+rnorm(prod(dim(d)),mean=0,sd=fac*sdd)
d_noise<-matrix(d_noise,nrow=nrow(d),ncol=ncol(d))
rownames(d_noise)<-rownames(d); colnames(d_noise)<-colnames(d)
Td_noise<-transformE(d_noise)  #transform the noisy data
#shows how the transform looks compared to the original data
plotsummary(Td_noise)
#shows how the data looks compared to the signal data
plotsummary(Td_noise,Td)
#change the label spacing on the images to fit in the yaxis numbers
plotsummary(Td_noise,yline=5,yma=8)
plotsummary(Td_noise,Td,yline=5,yma=10, fave=TRUE,
 row_unit="Day Number", col_unit="Year",
 z_unit="Temperature (C)",inc=1)
 # plot averages of the data /signal and
 #compare to averages with error due to equitable system
# 45x30 data set of 3 sets of random numbers coupled together
#in an equitable system
d<-eg8(3,3)
Td<-transformE(d,Ave=TRUE)
#data set entirely equitable but rows and column values have random distribution
plotsummary(Td_noise=Td,fave=TRUE)
# averages along rows and columns show large error but
#system is entirely specified by f,g,u
#no errors in knowing equitable average values as they are entiely
# specified in system


celphin/Equitable documentation built on Jan. 23, 2023, 11:02 p.m.