Description Usage Arguments Details Value Examples
The regEquation
function takes a WREG object and returns
the equation string.
1 | regEquation(object, decimals = 2)
|
object |
The dependent variable of interest, with any transformations already applied. |
decimals |
An integer or vector of integers specifying how many decimal
places should be used for each coefficient. If provided as a vector that
does not match the number of rows in |
This function is used via a the print command, but can also be used by itself.
A character string using the estimated coefficients and the
coefficient names from the object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Import some example data
peakFQdir <- paste0(
file.path(system.file("exampleDirectory", package = "WREG"),
"pfqImport"))
gisFilePath <- file.path(peakFQdir, "pfqSiteInfo.txt")
importedData <- importPeakFQ(pfqPath = peakFQdir, gisFile = gisFilePath)
# Run a simple regression
Y <- importedData$Y$AEP_0.5
X <- importedData$X[c("Sand", "OutletElev", "Slope")]
X <- cbind(data.frame("Intercept" = rep(1, nrow(X))), X)
transY <- "none"
result <- WREG.OLS(Y, X, transY)
print(regEquation(result))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.