Skip to content

Commit

Permalink
Merge pull request #58 from krystian8207/separating-local-from-global…
Browse files Browse the repository at this point in the history
…-parameters

Separate local from global parameters.
  • Loading branch information
krystian8207 authored Nov 30, 2018
2 parents 520263c + c43673c commit 969eccb
Show file tree
Hide file tree
Showing 40 changed files with 1,319 additions and 817 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ Suggests:
factoMerger,
testthat,
knitr,
rmarkdown
rmarkdown,
ResourceSelection
VignetteBuilder: knitr
20 changes: 7 additions & 13 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# Generated by roxygen2: do not edit by hand

S3method(extract_xspliner_function,xspliner)
S3method(plot,xspliner)
S3method(predict,xspliner)
S3method(xspline,default)
S3method(xspline,explainer)
S3method(xspline,formula)
export(extract_formula_var_names)
export(factor_opts_default)
export(get_component_params)
export(get_formula_details)
export(get_formula_raw_components)
export(get_formula_special)
export(get_special_component_details)
export(get_special_components_info)
export(numeric_opts_default)
export(prepare_call)
export(r_squared)
export(transform_formula_chr)
export(transformed_formula_object)
export(aic)
export(extract_xspliner_function)
export(get_special_predictors)
export(hoslem)
export(xf_opts_default)
export(xs_opts_default)
export(xspline)
importFrom(magrittr,"%>%")
4 changes: 2 additions & 2 deletions R/plot-xspliner.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plot.xspliner <- function(x, variable_name = NULL, plot_response = TRUE,
}

response_var <- environment(x)$response
xp_call <- environment(x)$xs_call[[variable_name]]
xp_call <- environment(x)$xs_functions[[variable_name]]

if (plot_data) {
plot_range <- range(data[, variable_name])
Expand All @@ -35,7 +35,7 @@ plot.xspliner <- function(x, variable_name = NULL, plot_response = TRUE,

plot_data_data <- data

plot_response_data <- environment(x)$xs_env_list[[variable_name]]$blackbox_response_obj
plot_response_data <- environment(x)$quantitative_transitions[[variable_name]]$effect_outcome
colnames(plot_response_data) <- c(variable_name, response_var)

x_approx <- seq(plot_range[1], plot_range[2], length.out = nrow(plot_response_data))
Expand Down
2 changes: 1 addition & 1 deletion R/predict-xspliner.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
#'
#' @export
predict.xspliner <- function(xspliner, newdata) {
mgcv::predict.gam(xspliner, newdata = newdata)
stats::predict.glm(xspliner, newdata = newdata)
}
Loading

0 comments on commit 969eccb

Please sign in to comment.