-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
99 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
#' @param cores positive integer(default is 1). If cores > 1, a 'parallel' package | ||
#' cluster with that many cores is created and used. You can also supply a cluster | ||
#' object. | ||
#' @param ... (optional) Other arguments passed to `rpart::rpart`. | ||
#' @param ... (optional) Other arguments passed to `rpart::rpart()`. | ||
#' | ||
#' @return A list of the GOZH model result. | ||
#' @export | ||
|
@@ -69,11 +69,17 @@ gozh = \(formula,data,cores = 1,...){ | |
return(res) | ||
} | ||
|
||
|
||
#' @title Q-statistics of geographical detector based on Recursive Partitioning | ||
#' @author Wenbo Lv \email{[email protected]} | ||
#' | ||
#' @param formula A formula. | ||
#' @param data A data.frame or tibble of observation data. | ||
#' @param ... (optional) Other arguments passed to `rpart::rpart()`. | ||
#' | ||
#' @importFrom rpart rpart | ||
#' @importFrom tibble as_tibble_row | ||
#' @noRd | ||
#' @return A tibble contains the Q-statistic and the p-value. | ||
#' @export | ||
gd_rpart = \(formula,data,...){ | ||
formula = stats::as.formula(formula) | ||
formula.vars = all.vars(formula) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.