Learn R Programming

densityratio (version 0.2.1)

print.spectral: Print a spectral object

Description

Print a spectral object

Usage

# S3 method for spectral
print(x, digits = max(3L, getOption("digits") - 3L), ...)

Value

invisble The inputted spectral object.

Arguments

x

Object of class spectral.

digits

Number of digits to use when printing the output.

...

further arguments on how to format the number of digits.

See Also

print, spectral

Examples

Run this code
set.seed(123)
# Fit model
dr <- spectral(numerator_small, denominator_small)
# Inspect model object
dr
# Obtain summary of model object
summary(dr)
# Plot model object
plot(dr)
# Plot density ratio for each variable individually
plot_univariate(dr)
# Plot density ratio for each pair of variables
plot_bivariate(dr)
# Predict density ratio and inspect first 6 predictions
head(predict(dr))
# Fit model with custom parameters
spectral(numerator_small, denominator_small, sigma = 2)

Run the code above in your browser using DataLab