DR_data(Y, trafo = sqrt(.Machine$double.eps), base = 1,
norm_tol = sqrt(.Machine$double.eps))
## S3 method for class 'DirichletRegData':
print(x, type = c("processed", "original"), \dots)
## S3 method for class 'DirichletRegData':
summary(object, \dots)matrix or data.frame with nonnegative values of all compositional variables (in some cases, a vector is also permissible, see TRUE) or suppress (FALSE) transfonorm_tol is a small non-negative value (default: sqrt(.Machine$dDirichletRegData object"processed" or "original" dataDirichletRegData objectmatrix object of class DirichletRegData with the following attributes:NULL) and column names.Y (i.e., number of columns)YY (i.e., number of rows)YY is a matrix or data.frame containing compositional variables.
If they do not sum up to 1 for all observations, normalization is forced where each row entry is divided by the row's sum (a warning will be issued that normalization was applied).
In case one row-entry (or more) is NA, the whole row will be returned as NA.
Beta-distributed variables can be supplied as a single vector which, however, has to have values in the interval $[0,\,1]$.
The second variable will be generated (1 - Y) and a matrix consisting of the columns 1 - Y and Y will be returned.
A message will be issued that a beta-distributed variable was assumed and that this assumtion needs to be checked.
}
trafotrafo = TRUE) is a generalization of that proposed by Smithson and Verkuilen (2006) that transforms each component $y$ of $Y$ by computing $y^{*}=\frac{y(n-1)+\frac{1}{2}}{n}$ where $n$ is the number of observations in $Y$ (this approach is also used in the package baseY for the base can be used. This is by default set to the first variable in Y (if a vector is be supplied, the column 1 - Y becomes the base component).
Note that the definition can be overruled in DirichReg.
}
x and objectDR_data.
}
type# create a DirichletRegData object from the Arctic Lake data
head(ArcticLake[, 1:3])
AL <- DR_data(ArcticLake[, 1:3])
summary(AL)
head(AL)Run the code above in your browser using DataLab