Learn R Programming

kzs (version 1.2.0)

argskzs: Argument Limits for SKZS

Description

This function calculates the values for which the arguments delta1, delta2 and h1, h2 in SKZS are bounded above or below by.

Usage

argskzs(data, x1, x2)

Arguments

data
a data frame to be used with SKZS. Only the columns corresponding the input variables X = (x1, x2) are needed; the column corresponding to the response variable is optional, but plays no part in the use of this funct
x1
an integer specifying the position of the column in the data frame containing x1 values.
x2
an integer specifying the position of the column in the data frame containing x2 values.

Value

  • a list containing the following:
  • delta1the bounding value for the argument delta1
  • delta2the bounding value for the argument delta2
  • h1the bounding value for the argument h1
  • h2the bounding value for the argument h2

Details

In the SKZS function (similarly to the kzs function), the arguments delta1 and delta2 are the physical ranges of smoothing in terms of the unit values of the input variables x1 and x2; the arguments h1 and h2 are scale readings of all outcomes of the algorithm; more specifically, h1 and h2 are values denoting the interval widths of two uniform scales overlapping the x1 and x2 axes. The restrictions on the arguments are the same as for the one dimensional input variable in KZS, only here, the restrictions are extended to the two-dimensional input variables x1 and x2. The purpose of this function is to give an upper bound on the values delta1, delta2 and h1, h2 so that users may select appropriate values that satisfy all restrictions. This function eliminates any guess-work involved in choosing a satisfying value for the arguments and should be used prior to using SKZS in order to save time and increase efficiency of use.

See Also

skzs

Examples

Run this code
### Recall the SKZS example of the Sinc function

# Setup the data
u <- seq(-3*pi, 3*pi, 3*pi/100)
v <- u
x1 <- sample(u, size = 4000, replace = TRUE)
x2 <- sample(v, size = 4000, replace = TRUE)
d <- data.frame(cbind(x1,x2))
df <- unique(d)
df$z <- sin(sqrt(df$x1^2 + df$x2^2)) / sqrt(df$x1^2 + df$x2^2)
df$z[is.na(df$z)] <- 1

# Return the bounding values for each argument
argskzs(df, 1, 2)

Run the code above in your browser using DataLab