Description Usage Arguments Value Examples
predictQAS
is used to categorize numeric variables in a dataset the same way as the QAS.func-Function for calculating the coefficients.
1 | predictQAS(QAS.res, data, same = FALSE)
|
QAS.res |
The results of the QAS.func-Function |
data |
A data frame containing the variables in the model for QAS.func |
same |
a logical vector which indicates whether prediction of the dependent variable is applied for the same dataset used for QAS.func. Its default is FALSE. |
An object of class predictQAS is a list containing at least the following components:
yhat
the predicted values of the dependent variable based on the coefficients of QAS.func and the dataset used for categorization
transformed_data
the dataset with categorized numeric variables
AIC
A version of Akaike's Information Criterion
BIC
A version if Bayesian Information Criterion
1 2 3 4 5 6 7 8 9 10 11 | # generate Data
y <- as.integer(c(1,0,0,0,1,1,1,0,0,1))
x <- c(15,88,90,60,24,30,26,57,69,18)
z <- as.integer(c(3,2,2,1,3,3,2,1,1,3))
example_data <- data.frame(y,x,z)
# deploy QAS.func-Function
result1 <- QAS.func(y~x+z, data=example_data, weights=NULL, seed=NULL, tau = NULL)
# deploy predictQas-Function
result2 <- predictQAS(QAS.res = result1, data=example_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.