Skip to content

Commit

Permalink
Improve support for rqs (#839)
Browse files Browse the repository at this point in the history
* Improve support for rqs

* fix test
  • Loading branch information
strengejacke authored Dec 23, 2023
1 parent cfadb8f commit 4ffc6fb
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 63 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: insight
Title: Easy Access to Model Information for Various Model Objects
Version: 0.19.7.5
Version: 0.19.7.6
Authors@R:
c(person(given = "Daniel",
family = "Lüdecke",
Expand Down
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ S3method(find_algorithm,mixed)
S3method(find_algorithm,nestedLogit)
S3method(find_algorithm,rlmerMod)
S3method(find_algorithm,rq)
S3method(find_algorithm,rqs)
S3method(find_algorithm,rqss)
S3method(find_algorithm,scam)
S3method(find_algorithm,speedglm)
Expand Down Expand Up @@ -1118,6 +1119,7 @@ S3method(link_function,psm)
S3method(link_function,riskRegression)
S3method(link_function,robmixglm)
S3method(link_function,rq)
S3method(link_function,rqs)
S3method(link_function,rqss)
S3method(link_function,speedglm)
S3method(link_function,speedlm)
Expand Down Expand Up @@ -1241,6 +1243,7 @@ S3method(link_inverse,psm)
S3method(link_inverse,riskRegression)
S3method(link_inverse,robmixglm)
S3method(link_inverse,rq)
S3method(link_inverse,rqs)
S3method(link_inverse,rqss)
S3method(link_inverse,speedglm)
S3method(link_inverse,speedlm)
Expand Down Expand Up @@ -1389,6 +1392,7 @@ S3method(model_info,riskRegression)
S3method(model_info,rma)
S3method(model_info,robmixglm)
S3method(model_info,rq)
S3method(model_info,rqs)
S3method(model_info,rqss)
S3method(model_info,speedglm)
S3method(model_info,speedlm)
Expand Down Expand Up @@ -1500,6 +1504,7 @@ S3method(n_obs,poissonmfx)
S3method(n_obs,probitmfx)
S3method(n_obs,riskRegression)
S3method(n_obs,rq)
S3method(n_obs,rqs)
S3method(n_obs,rqss)
S3method(n_obs,selection)
S3method(n_obs,sem)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Removed deprecated arguments in `get_data.mmrm()`.

* Improved support for models of class `rqs` (package *quantreg*).

## Bug fixes

* Fixed issue in `get_loglikelihood()` for glm-models with binary outcome, where
Expand Down
12 changes: 6 additions & 6 deletions R/find_algorithm.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ find_algorithm.rq <- function(x, ...) {
list(algorithm = x$method)
}

#' @export
find_algorithm.rqs <- find_algorithm.rq

#' @export
find_algorithm.rqss <- find_algorithm.rq


#' @export
find_algorithm.bayesx <- function(x, ...) {
Expand All @@ -209,12 +215,6 @@ find_algorithm.crq <- function(x, ...) {
}


#' @export
find_algorithm.rqss <- function(x, ...) {
list(algorithm = x$method)
}


#' @export
find_algorithm.glm <- function(x, ...) {
list(algorithm = "ML")
Expand Down
3 changes: 3 additions & 0 deletions R/link_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ link_function.gls <- link_function.lm
#' @export
link_function.rq <- link_function.lm

#' @export
link_function.rqs <- link_function.lm

#' @export
link_function.rqss <- link_function.lm

Expand Down
3 changes: 3 additions & 0 deletions R/link_inverse.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ link_inverse.lme <- link_inverse.lm
#' @export
link_inverse.rq <- link_inverse.lm

#' @export
link_inverse.rqs <- link_inverse.lm

#' @export
link_inverse.rqss <- link_inverse.lm

Expand Down
3 changes: 3 additions & 0 deletions R/model_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ model_info.bayesx <- model_info.maxLik
#' @export
model_info.rq <- model_info.maxLik

#' @export
model_info.rqs <- model_info.maxLik

#' @export
model_info.crq <- model_info.maxLik

Expand Down
Loading

0 comments on commit 4ffc6fb

Please sign in to comment.