Skip to content

Commit

Permalink
Merge pull request #65 from AQLT/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyBarthelemy authored Sep 30, 2024
2 parents 146ab5f + 0312ef1 commit 1874c84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions R/jd2r.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ NULL
}
}


.jd2r_regression_item <- function(s) {
desc <- .jcall(s, "S", "getDescription")
val <- .jcall(s, "D", "getCoefficient")
stderr <- .jcall(s, "D", "getStdError")
pval <- .jcall(s, "D", "getPvalue")
res <- matrix(c(val, stderr, val/stderr, pval), nrow = 1)
colnames(res) <- c("Estimate", "Std. Error", "T-stat", "Pr(>|t|)")
rownames(res) <- desc
res
}
#' @export
#' @rdname jd3_utilities
.r2jd_tsdata<-function(s){
Expand Down
2 changes: 2 additions & 0 deletions R/jd3rslts.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
return(.jevalArray(s, silent=TRUE))
else if (.jinstanceof(s, "jdplus/toolkit/base/api/stats/StatisticalTest")) {
return(.jd2r_test(s))
} else if (.jinstanceof(s, "jdplus/toolkit/base/api/timeseries/regression/RegressionItem")){
return(.jd2r_regression_item(s))
}
else
return(.jcall(s, "S", "toString"))
Expand Down

0 comments on commit 1874c84

Please sign in to comment.