Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 98a082c
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Mar 11 21:15:53 2024 +0200

    fix bugs

commit a4a3cf5
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Mar 11 21:15:33 2024 +0200

    Update parallel.h

commit 10e9240
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Mar 11 21:15:27 2024 +0200

    Update DESCRIPTION

commit fde4fb1
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Wed Mar 6 19:51:38 2024 +0200

    change

commit 2afc14d
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Mar 6 13:39:48 2024 +0200

    fix some bugs

commit 0460527
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Feb 23 23:15:11 2024 +0200

    replace old NULL with nullptr

commit 725cc4c
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Feb 23 23:14:51 2024 +0200

    Update collognorm.mle.Rd

commit 10e4b50
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Feb 23 23:06:09 2024 +0200

    change

commit fd4cb89
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Feb 20 22:09:15 2024 +0200

    fix bug

commit 20774ab
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Feb 20 22:05:34 2024 +0200

    Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev

commit abe9893
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Feb 20 22:03:06 2024 +0200

    Revert "Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev"

    This reverts commit 7314ccd, reversing
    changes made to 014ec2b.

commit 7314ccd
Merge: 014ec2b 6aadbe7
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Feb 20 20:55:07 2024 +0200

    Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev

commit 014ec2b
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Feb 20 20:55:03 2024 +0200

    change

commit 6aadbe7
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Feb 20 19:38:50 2024 +0200

    Revert "add warnings"

    This reverts commit f4190e9.

commit f7e527d
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Feb 14 15:26:55 2024 +0200

    fix bug

commit 5a83d54
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Feb 6 12:11:11 2024 +0200

    change

commit ad51bc9
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Sun Feb 4 19:25:27 2024 +0200

    change

commit 4324a3a
Merge: 3f21641 f4190e9
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Wed Jan 24 17:02:42 2024 +0200

    Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev

commit 3f21641
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Wed Jan 24 17:02:16 2024 +0200

    change

commit f4190e9
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jan 19 19:12:27 2024 +0200

    add warnings

commit 2469010
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jan 19 19:12:34 2024 +0200

    Update NEWS.md

commit 0ee990f
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jan 19 19:12:30 2024 +0200

    Update DESCRIPTION

commit 4ccb97e
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Thu Dec 7 14:28:10 2023 +0200

    change

commit d547c07
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Thu Dec 7 14:27:29 2023 +0200

    change

commit be09c5d
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Dec 6 12:54:04 2023 +0200

    Update NEWS.md

commit 2f32355
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Dec 6 12:54:00 2023 +0200

    fix macros

commit b972696
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Nov 15 16:40:52 2023 +0200

    Update README.md

commit 9af0cc8
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Nov 15 16:40:49 2023 +0200

    Update settings.json

commit 2aec718
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Nov 15 16:40:46 2023 +0200

    add new method for col group

commit 609d527
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Nov 14 19:29:09 2023 +0200

    change

commit c41d1e6
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Nov 14 18:54:15 2023 +0200

    change

commit 916c2af
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Oct 31 10:45:15 2023 +0200

    change

commit cba662e
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Oct 31 10:43:55 2023 +0200

    change

commit e091936
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Oct 27 19:49:01 2023 +0300

    change

commit d1273d0
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Oct 27 19:45:14 2023 +0300

    change

commit 54ffec7
Merge: b4726b8 37a4b02
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Oct 27 19:33:54 2023 +0300

    Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev

commit b4726b8
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Oct 27 19:33:51 2023 +0300

    change

commit 37a4b02
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Oct 27 14:05:27 2023 +0300

    fix bugs

commit 8b12f11
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Thu Oct 26 21:00:21 2023 +0300

    change

commit 10534f2
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Thu Oct 26 20:56:34 2023 +0300

    change

commit 1d35e7b
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Thu Oct 26 20:00:29 2023 +0300

    add manos work

commit 89ae346
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Thu Oct 26 20:00:11 2023 +0300

    Update normal.etest.R

commit 9d92222
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Thu Oct 26 19:59:55 2023 +0300

    Update NAMESPACE

commit a6acd3a
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Oct 25 23:49:37 2023 +0300

    remove deprecated function

commit a0c8d70
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Oct 24 21:59:50 2023 +0300

    change

commit 99b4bba
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Oct 24 21:51:03 2023 +0300

    change

commit c23e0a3
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Tue Oct 17 17:15:26 2023 +0300

    change

commit 8d0b8c5
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Mon Oct 16 21:54:46 2023 +0300

    change

commit bffd73d
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Mon Oct 16 21:52:57 2023 +0300

    change

commit fbf870a
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Mon Oct 16 21:52:11 2023 +0300

    change

commit 6a32640
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Mon Oct 16 21:50:55 2023 +0300

    change

commit 6106725
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Sep 29 16:44:09 2023 +0300

    change

commit 56b4fc0
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Sep 29 16:40:29 2023 +0300

    Revert "change"

    This reverts commit 9cde21b.

commit 932bcaf
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Sep 29 16:36:03 2023 +0300

    Revert "Revert "change""

    This reverts commit a2ff294.

commit a2ff294
Author: Michail Tsagris <mtsagris@yahoo.gr>
Date:   Fri Sep 29 16:34:30 2023 +0300

    Revert "change"

    This reverts commit 9cde21b.

commit a5dd5f9
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Sep 29 15:34:38 2023 +0300

    update

commit 9cde21b
Author: statlink <mtsagris@yahoo.gr>
Date:   Fri Sep 8 17:50:27 2023 +0300

    change

commit 687b7a7
Author: statlink <mtsagris@yahoo.gr>
Date:   Fri Sep 8 17:40:14 2023 +0300

    Update jbtests.R

commit ecda610
Author: statlink <mtsagris@yahoo.gr>
Date:   Fri Sep 8 17:20:16 2023 +0300

    change

commit 18d7098
Author: statlink <mtsagris@yahoo.gr>
Date:   Fri Sep 8 10:34:42 2023 +0300

    change

commit 0bfdc51
Author: statlink <mtsagris@yahoo.gr>
Date:   Fri Sep 8 10:10:39 2023 +0300

    changes

commit e76727f
Author: statlink <mtsagris@yahoo.gr>
Date:   Fri Sep 8 10:06:45 2023 +0300

    changes

commit 9a20bf0
Author: statlink <mtsagris@yahoo.gr>
Date:   Thu Sep 7 19:29:00 2023 +0300

    Update univariate.mle.R

commit 3010fa5
Merge: bcb5f8f 23c639c
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 21 13:48:53 2023 +0300

    Merge branch 'master' into Dev

commit bcb5f8f
Merge: ed58ece 50eb865
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 21 13:45:55 2023 +0300

    Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev

commit ed58ece
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 21 13:45:44 2023 +0300

    Update parallel.h

commit bd0cd71
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 21 13:45:40 2023 +0300

    update date

commit 50eb865
Author: statlink <mtsagris@yahoo.gr>
Date:   Wed Jul 19 16:45:31 2023 +0300

    change

commit 1511061
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 19 02:32:31 2023 +0300

    fix bug with clang and apple mac

commit d3d04e7
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 19 02:32:03 2023 +0300

    Update NEWS.md

commit feb5e2a
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 19 02:31:58 2023 +0300

    Update Rfast2-package.Rd

commit 6098801
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 19 02:31:51 2023 +0300

    Update DESCRIPTION

commit 1d214fa
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 12 18:29:49 2023 +0300

    add tbb

commit ea9d666
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 12 18:29:41 2023 +0300

    Update Rfast2-package.Rd

commit 59983ef
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 12 18:29:39 2023 +0300

    Update parallel.h

commit 8637164
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Jul 12 18:29:33 2023 +0300

    Update DESCRIPTION

commit cae025a
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Jul 11 17:49:28 2023 +0300

    add mising option parallel

commit f88875c
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Jul 11 17:34:51 2023 +0300

    Update init.c

commit 2aaec6a
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Jul 11 17:34:48 2023 +0300

    Update onAttach.R

commit 330f2bf
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Tue Jul 11 17:34:44 2023 +0300

    Update .Rbuildignore

commit ca46228
Merge: 55eb8d9 5bc90bc
Author: statlink <mtsagris@yahoo.gr>
Date:   Tue Jul 11 16:15:46 2023 +0300

    Merge branch 'Dev' of https://github.com/RfastOfficial/Rfast2 into Dev

commit 55eb8d9
Author: statlink <mtsagris@yahoo.gr>
Date:   Tue Jul 11 16:15:43 2023 +0300

    changes

commit 5bc90bc
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:24:38 2023 +0300

    add parallel to vector functions

commit 747beec
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:24:17 2023 +0300

    export to linking to functions and support c++17 parallelization

commit 565199d
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:23:46 2023 +0300

    change cores for omp by user

commit 220d057
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:23:06 2023 +0300

    Update init.c

commit 4cd20ed
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:23:03 2023 +0300

    Update Rfast2-package.Rd

commit ca4764d
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:22:59 2023 +0300

    Update NEWS.md

commit cec9c9d
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:22:54 2023 +0300

    remove system.time

commit 87b573f
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:22:40 2023 +0300

    support c++17 parallel ppolicy using RcppParallel

commit b47e649
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:21:15 2023 +0300

    Update DESCRIPTION

commit ea15df7
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Mon Jul 10 17:21:12 2023 +0300

    Update settings.json

commit 2603982
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:14:19 2023 +0300

    Update col_row_utilities.cpp

commit 0c23705
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:14:15 2023 +0300

    Delete templates.h

commit 3c17730
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:14:11 2023 +0300

    Update utilities.cpp

commit 3670e43
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:14:04 2023 +0300

    fix headers

commit 046fcc7
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:13:44 2023 +0300

    Update init.c

commit 74e3e13
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:13:38 2023 +0300

    fix headers

commit 5cc7bac
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:13:02 2023 +0300

    Update NEWS.md

commit 665065b
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:12:56 2023 +0300

    add core argument for parallelization

commit 36fdd77
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:11:34 2023 +0300

    code for checking concepts

commit 7b8b7ca
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 13:09:12 2023 +0300

    create for linking to

commit 6029327
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Fri Jul 7 12:57:52 2023 +0300

    Create settings.json

commit 1505a2c
Author: statlink <mtsagris@yahoo.gr>
Date:   Tue Apr 11 11:16:24 2023 +0300

    changes

commit c1c0c97
Author: statlink <mtsagris@yahoo.gr>
Date:   Sat Apr 8 11:13:26 2023 +0300

    changes

commit e44c596
Author: Manos Papadakis <papadakm95@gmail.com>
Date:   Wed Apr 5 16:49:30 2023 +0300

    fix bug
  • Loading branch information
ManosPapadakis95 committed Mar 11, 2024
1 parent 23c639c commit 645fdad
Show file tree
Hide file tree
Showing 37 changed files with 1,676 additions and 1,052 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@
"unordered_set": "cpp",
"execution": "cpp",
"numeric": "cpp"
}
},
"r.lsp.promptToInstall": false
}
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
Package: Rfast2
Type: Package
Title: A Collection of Efficient and Extremely Fast R Functions II
Version: 0.1.5.1
Date: 2023-07-21
Author: Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Version: 0.1.5.2
Date: 2024-03-10
Author: Manos Papadakis, Michail Tsagris, Stefanos Fafalios, Marios Dimitriadis and Manos Lasithiotakis.
Maintainer: Manos Papadakis <rfastofficial@gmail.com>
Depends: R (>= 3.5.0), Rcpp (>= 0.12.3), RcppParallel
LinkingTo: Rcpp (>= 0.12.3), RcppArmadillo, RcppParallel
SystemRequirements: C++17
Imports: Rfast, RANN
Imports: Rfast, Rnanoflann
BugReports: https://github.com/RfastOfficial/Rfast2/issues
URL: https://github.com/RfastOfficial/Rfast2
Description: A collection of fast statistical and utility functions for data analysis. Functions for regression, maximum likelihood, column-wise statistics and many more have been included. C++ has been utilized to speed up the functions.
Description: A collection of fast statistical and utility functions for data analysis. Functions for regression, maximum likelihood, column-wise statistics and many more have been included. C++ has been utilized to speed up the functions. References: Tsagris M., Papadakis M. (2018). Taking R to its limits: 70+ tips. PeerJ Preprints 6:e26605v1 <doi:10.7287/peerj.preprints.26605v1>.
License: GPL (>= 2.0)
NeedsCompilation: yes
15 changes: 10 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
useDynLib("Rfast2", .registration = TRUE)

importFrom("stats", "pt", "cov", "pchisq", "pf", "cor", "qt", "sd","qnorm", "dpois", "pnorm", "rchisq", "rexp", ".lm.fit", "qf", "model.matrix", "aggregate", "prcomp", "qchisq", "optimise", "runif", "dnorm", "dbinom", "dexp", "dgeom", "nlm" , "optimize",
"optim", "lm.fit", "uniroot")
importFrom("stats", "pt", "cov", "pchisq", "pf", "cor", "qt", "sd","qnorm", "dpois", "pnorm", "rchisq",
"rexp", ".lm.fit", "qf", "model.matrix", "aggregate", "prcomp", "qchisq", "optimise", "runif", "dnorm",
"dbinom", "dexp", "dgeom", "nlm" , "optimize", "optim", "lm.fit", "uniroot")

importFrom("graphics", "contour", "points")

importFrom("Rfast", vm.mle, colvm.mle, colmeans, colsums, eachrow,group, colVars, spdinv, mediandir, colMins, nth,gammamle, weibull.mle, poisson_only, logistic_only, multinom.regs,multinom.mle, Var, normlog.regs, eachcol.apply, Sort,coldiffs,rowsums)
importFrom("Rfast", vm.mle, colvm.mle, colmeans, colsums, eachrow, group, colVars, spdinv, mediandir,
colMins, nth, gammamle, weibull.mle, poisson_only, logistic_only, multinom.regs, multinom.mle, Var,
normlog.regs, eachcol.apply, Sort, coldiffs, rowsums, rep_col, colShuffle)

importFrom("RANN", nn2)
importFrom("Rnanoflann", nn)

importFrom(Rcpp, evalCpp)
importFrom(RcppParallel, RcppParallelLibs)

export(.onAttach,Intersect,Merge,Quantile,Runif,Sample,Sample.int,add.term,benchmark,bernoulli.nb,bernoullinb.pred,beta.nb,betanb.pred,bic.regs,big.knn,bigknn.cv,binom.reg,boot.hotel2,boot.james,boot.student2,boot.ttest1,cauchy.nb,cauchy0.mle,cauchy0.mle,cauchynb.pred,cbern.mle,censpois.mle,censpois.mle,censweib.reg,censweibull.mle,censweibull.mle,circ.cor1,circ.cors1,cls,cluster.lm,col.waldpoisrat,colGroup,colQuantile,colTrimMean,colaccs,colbeta.mle,colborel.mle,colcauchy.mle,colfbscores,colfmis,colfscores,colhalfnorm.mle,coljack.means,collogitnorm.mle,collognorm.mle,colmaes,colmeansvars,colmses,colordinal.mle,colpinar1,colpkl,colprecs,colsens,colspecs,colspml.mle,colukl,colunitweibull.mle,colwlsmeta,cor_test,covar,covdist,covequal,covlikel,covmtest,covrob.lm,dcora,den.contours,depth.mahala,diffic,discrim,embed.circaov,empirical.entropy,fbed.reg,fe.lmfit,fedhc.skel,fipois.reg,fisher.da,fp,gammapois.mle,gammapois.mle,gammareg,gammaregs,gee.reg,gnormal0.mle,gumbel.reg,halfcauchy.mle,halfcauchy.mle,hcf.circaov,hellinger.countreg,het.circaov,het.lmfit,hp.reg,is.lower.tri,is.skew.symmetric,is.upper.tri,jack.mean,km,kumar.mle,kumar.mle,laplace.nb,laplacenb.pred,leverage,lm.bsreg,lm.drop1,lm.parboot,logiquant.regs,logitnorm.nb,logitnormnb.pred,lr.circaov,lud,mci,mle.lda,mmhc.skel,mmpc,mmpc2,moranI,multinom.reg,multinomreg.cv,multispml.mle,multivm.mle,mv.score.betaregs,mv.score.expregs,mv.score.gammaregs,mv.score.glms,mv.score.invgaussregs,mv.score.weibregs,nb.cv,negbin.reg,negbin.regs,normlog.nb,normlognb.pred,omp2,overdispreg.test,pc.sel,pca,pcr,perm.ttest2,pinar1,pooled.colVars,powerlaw.mle,powerlaw.mle,prophelling.reg,propols.reg,purka.mle,purka.mle,rbeta1,refmeta,reg.mle.lda,regmlelda.cv,riag,rm.hotel,rowQuantile,rowTrimMean,rowjack.means,sclr,score.zipregs,simplex.mle,simplex.mle,sp.logiregs,sp.mle,spml.nb,spmlnb.pred,stud.ttests,tobit.reg,trim.mean,trunccauchy.mle,trunccauchy.mle,truncexpmle,truncexpmle,unitweibull.mle,vm.nb,vmnb.pred,wald.poisrat,walter.ci,weib.regs,weibull.nb,weibullnb.pred,welch.tests,wild.boot,wlsmeta,zigamma.mle,zigamma.mle,zigamma.reg,zil.mle,zil.mle,ziweibull.mle,ziweibull.mle,ztp.reg)
export(Intersect,Merge,Quantile,Runif,Sample,Sample.int,add.term,batch.logistic,benchmark,bernoulli.nb,bernoullinb.pred,beta.nb,betanb.pred,bic.regs,big.knn,bigknn.cv,binom.reg,boot.hotel2,boot.james,boot.student2,boot.ttest1,cauchy.nb,cauchy0.mle,cauchynb.pred,cbern.mle,censpois.mle,censweib.reg,censweibull.mle,circ.cor1,circ.cors1,cls,cluster.lm,col.waldpoisrat,colGroup,colQuantile,colTrimMean,colaccs,colbeta.mle,colborel.mle,colcauchy.mle,colcenspois.mle,colcensweibull.mle,colfbscores,colfmis,colfscores,colhalfcauchy.mle,colhalfnorm.mle,coljack.means,collogitnorm.mle,collognorm.mle,colmaes,colmeansvars,colmses,colordinal.mle,colpinar1,colpkl,colpowerlaw.mle,colprecs,colsens,colsp.mle,colspecs,colspml.mle,colukl,colunitweibull.mle,colwlsmeta,cor_test,covar,covdist,covequal,covlikel,covmtest,covrob.lm,dcora,den.contours,depth.mahala,diffic,discrim,eel.cor.test,el.cor.test,embed.circaov,empirical.entropy,fbed.reg,fe.lmfit,fedhc.skel,fipois.reg,fisher.da,fp,gammapois.mle,gammareg,gammaregs,gee.reg,gnormal0.mle,gumbel.reg,halfcauchy.mle,hcf.circaov,hellinger.countreg,het.circaov,het.lmfit,hp.reg,is.lower.tri,is.skew.symmetric,is.upper.tri,jack.mean,jbtest,jbtests,km,kumar.mle,laplace.nb,laplacenb.pred,leverage,lm.bsreg,lm.drop1,lm.nonparboot,lm.parboot,logiquant.regs,logitnorm.nb,logitnormnb.pred,lr.circaov,lud,mci,mle.lda,mmhc.skel,mmpc,mmpc2,moranI,multinom.reg,multinomreg.cv,multispml.mle,multivm.mle,mv.score.betaregs,mv.score.expregs,mv.score.gammaregs,mv.score.glms,mv.score.invgaussregs,mv.score.weibregs,nb.cv,negbin.reg,negbin.regs,normal.etest,normlog.nb,normlognb.pred,omp2,overdispreg.test,pc.sel,pca,pcr,perm.ttest2,pinar1,pooled.colVars,powerlaw.mle,prophelling.reg,propols.reg,purka.mle,rbeta1,refmeta,reg.mle.lda,regmlelda.cv,riag,rm.hotel,rowQuantile,rowTrimMean,rowjack.means,sclr,score.zipregs,simplex.mle,sp.logiregs,sp.mle,spml.nb,spmlnb.pred,stud.ttests,tobit.reg,trim.mean,trunccauchy.mle,truncexpmle,unitweibull.mle,vm.nb,vmnb.pred,wald.poisrat,walter.ci,weib.regs,weibull.nb,weibullnb.pred,welch.tests,wild.boot,wlsmeta,zigamma.mle,zigamma.reg,zil.mle,ziweibull.mle,ztp.reg)

export(.onAttach)

S3method(colQuantile,data.frame)
S3method(colQuantile,matrix)
Expand Down
35 changes: 35 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@

</h1>

### **Version 0.1.5.2 - Zagreus**

------------------------------------------------------------------------

> <h3>**New**</h3>
>
> | Function | What's new! |
> |:--------:|:-----------------------------------------------------------------------------------:|
> | jbtests | Many Jarque–Bera normality tests |
> | lm.nonparboot | Non-parametric bootstrap for linear models |
> | normal.etest | Energy based normality test |
> | batch.logistic | Logistic regression for large scale data |
> | colhalfcauchy.mle | Column-wise MLE for the half Cauchy distribution |
> | colcenspois.mle | Column-wise MLE for the censored Poisson distribution |
> | colcensweibull.mle | Column-wise MLE for the censored Weibull distribution |
> | el.cor.test | Empirical likelihood test for the correlation coefficient |
> | eel.cor.test | Exponential empirical likelihood test for the correlation coefficient |
> | jbtest | Jarque–Bera normality test |
>
> <h3>**Improved**</h3> (***by speed, correctness or options***)
>
> | Function | What's new! |
> |:--------:|:-----------------------------------------------------------------------------------:|
> | halfcauchy.mle | Time improvement |
> | censpois.mle | Time improvement |
> | censweibull.mle | Time improvement |
>
> <h3>**LinkingTo**</h3> (***by speed, correctness or options***)
>
> | Function/Structure | What's new! |
> |:------------------:|:--------------------:|
> | | |
</br> </br>

### **Version 0.1.5.1 - Theseus**

------------------------------------------------------------------------
Expand Down
40 changes: 21 additions & 19 deletions R/big.knn.R
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
#[export]
big.knn <- function(xnew, y, x, k = 2:100, type = "C") {

if ( type == "C" ) y <- as.numeric(y)
if ( !is.matrix(xnew) ) xnew <- matrix(xnew, nrow = 1)
di <- RANN::nn2( data = x, query = xnew, k = max(k) )$nn.idx
nu <- dim(xnew)[1]
nk <- length(k)
est <- matrix(nrow = nu, ncol = nk)

if ( type == "C" ) {
m1 <- matrix(nrow = max(k), ncol = nu)
for ( i in 1:nu ) m1[, i] <- y[ di[i, ] ]
for ( j in 1:nk ) est[, j] <- Rfast::colMaxs( Rfast::colTabulate( m1[1:k[j], ] ) )
} else if ( type == "R" ) {
for ( i in 1:nu ) est[i, ] <- cumsum( y[ di[i, ] ] )[k] / k
}

colnames(est) <- paste("k=", k, sep = "")
est
big.knn <- function (xnew, y, x, k = 2:100, type = "C") {
if (type == "C")
y <- as.numeric(y)
if (!is.matrix(xnew))
xnew <- matrix(xnew, nrow = 1)
di <- Rnanoflann::nn(data = x, points = xnew, k = max(k))$indices
nu <- dim(xnew)[1]
nk <- length(k)
est <- matrix(nrow = nu, ncol = nk)
if (type == "C") {
m1 <- matrix(nrow = max(k), ncol = nu)
for (i in 1:nu) m1[, i] <- y[di[i, ]]
for (j in 1:nk) est[, j] <- Rfast::colMaxs(Rfast::colTabulate(m1[1:k[j],
]))
}
else if (type == "R") {
for (i in 1:nu) est[i, ] <- cumsum(y[di[i, ]])[k]/k
}
colnames(est) <- paste("k=", k, sep = "")
est
}



#[export]
bigknn.cv <- function(y, x, k = 5:10, type = "C", folds = NULL, nfolds = 10,
stratified = TRUE, seed = FALSE, pred.ret = FALSE) {
Expand Down
30 changes: 28 additions & 2 deletions R/column_wise_mle.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ colspml.mle <- function(x, tol = 1e-07, maxiters = 100, parallel = FALSE) {
#[export]
colcauchy.mle <- function (x, tol = 1e-07, maxiters = 100, parallel = FALSE) {
res <- .Call(Rfast2_colcauchy_mle, x, tol, parallel, maxiters)
colnames(res) <- c("location", "scale", "loglik")
colnames(res) <- c("loglik", "location", "scale")
res
}

Expand All @@ -104,4 +104,30 @@ colunitweibull.mle <- function(x, tol = 1e-07, maxiters = 100, parallel = FALSE)
loglik <- Rfast::colsums(lx) + n * log(a * b) + (b - 1) * Rfast::colsums( log(lx) ) - a * Rfast::rowsums( t(lx)^b )
param <- cbind(param, loglik)
param
}
}


#[export]
colpowerlaw.mle <- function(x) {
n <- dim(x)[1]
x1 <- Rfast::colMins(x, TRUE)
com <- Rfast::colsums( log(x) ) - n * log(x1)
a <- 1 + n/com
loglik <- n * log((a - 1)/x1) - a * com
res <- cbind(a, loglik)
colnames(res) <- c("alpha", "loglik")
res
}


#[export]
colsp.mle <- function(x) {
n <- dim(x)[1]
slx <- Rfast::colsums( log(x) )
b <- - n / slx
loglik <- n * log(b) + (b - 1) * slx
res <- cbind(b, loglik)
colnames(res) <- c("beta", "loglik")
res
}

84 changes: 84 additions & 0 deletions R/covariance_and_correlation_related_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,88 @@ covdist <- function(s1, s2) {



#[export]
el.cor.test <- function(y, x, rho, tol = 1e-07) {

funa <- function(zrho, n) {
lam1 <- 0
f <- mean(zrho) - rho
der <- sum( zrho^2 / (1 + lam1 * zrho)^2 )
lam2 <- lam1 + f/der
i <- 2
while (abs(lam1 - lam2) > tol) {
i <- i + 1
lam1 <- lam2
frac <- zrho / (1 + lam1 * zrho)
f <- sum( frac ) - rho
der <- sum( frac^2 )
lam2 <- lam1 + f/der
}
list(iters = i, lam2 = lam2, p = 1 / ( 1 + lam1 * zrho ) / n )
}

x <- ( x - mean(x) ) / Rfast::Var(x, std = TRUE)
y <- ( y - mean(y) ) / Rfast::Var(y, std = TRUE)
z <- x * y
n <- length(z)
zrho <- z - rho

res <- try( funa(zrho, n), silent = TRUE )
if ( identical(class(res), "try-error") ) {
p <- iters <- NULL
info <- c(0, 10^5, 0)
} else {
p <- res$p
stat <- -2 * sum( log(n * p) )
pvalue <- pchisq(stat, 1, lower.tail = FALSE)
info <- c(res$lam2, stat, pvalue)
iters <- res$iters
}
names(info) <- c("lambda", "statistic", "p-value")
list(iters = iters, info = info, p = p)
}



#[export]
eel.cor.test <- function(y, x, rho, tol = 1e-07) {

funa <- function(zrho, zhro2, n) {
lam1 <- 0
f <- mean(zrho) - rho
der <- ( n * sum(zrho2) - sum(zrho)^2 ) / n^2
lam2 <- lam1 - f / der
i <- 2
while (abs(lam1 - lam2) > tol) {
i <- i + 1
lam1 <- lam2
com <- exp( lam1 * zrho )
up <- sum( zrho * com )
down <- sum( com )
f <- up / down - rho
der <- ( sum(zrho2 * com) * sum(com) - up^2 ) / down^2
lam2 <- lam1 - f / der
}
list(iters = i, lam2 = lam2, p = com / down )
}

x <- ( x - mean(x) ) / Rfast::Var(x, std = TRUE)
y <- ( y - mean(y) ) / Rfast::Var(y, std = TRUE)
z <- x * y
n <- length(z)
zrho <- z - rho ; zrho2 <- zrho^2

res <- try( funa(zrho, zrho2, n), silent = TRUE )
if ( identical(class(res), "try-error") ) {
p <- iters <- NULL
info <- c(0, 10^5, 0)
} else {
p <- res$p
stat <- -2 * sum( log(n * p) )
pvalue <- pchisq(stat, 1, lower.tail = FALSE)
info <- c(res$lam2, stat, pvalue)
iters <- res$iters
}
names(info) <- c("lambda", "statistic", "p-value")
list(iters = iters, info = info, p = p)
}
2 changes: 1 addition & 1 deletion R/den.contours.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ den.contours <- function(x, type = "normal", v = 5) {
} else if ( type == "t" ) {
## we will use the previous function 'multivt' to
## estimate the parameters of the bivariate t first
f <- Rfast::mvt.mle(x)
f <- Rfast::mvt.mle(x, v = v)
m <- f$location
s <- f$scatter
r <- s[2] / sqrt(s[1] * s[4])
Expand Down
24 changes: 24 additions & 0 deletions R/jbtests.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#[export]
jbtest <- function(x) {
n <- length(x)
S <- Rfast::skew(x)
K <- Rfast::kurt(x)
jb <- n / 6 * ( S^2 + 0.25 * (K - 3)^2 )
pvalue <- pchisq(jb, 2, lower.tail = FALSE)
res <- c(jb, pvalue)
names(res) <- c("stat", "p-value")
res
}


#[export]
jbtests <- function(x) {
n <- dim(x)[1]
S <- Rfast::colskewness(x)
K <- Rfast::colkurtosis(x)
jb <- n / 6 * ( S^2 + 0.25 * (K - 3)^2 )
pvalue <- pchisq(jb, 2, lower.tail = FALSE)
res <- cbind(jb, pvalue)
colnames(res) <- c("stat", "p-value")
res
}
20 changes: 19 additions & 1 deletion R/lm.parboot.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,22 @@ lm.parboot <- function(x, y, R = 1000) {
z <- Rfast::matrnorm(n, R)
booty <- sqrt(s) * z + est
xx %*% booty
}
}


#[export]
lm.nonparboot <- function (x, y, R = 1000) {
x <- model.matrix(y ~ ., data.frame(x))
xx <- tcrossprod(Rfast::spdinv(crossprod(x)), x)
be <- xx %*% y
dm <- dim(x)
n <- dm[1]
p <- dm[2]
est <- as.vector(x %*% be)
res <- y - est
s <- Rfast::Var(res) * (n - 1)/(n - p)
z <- Rfast::rep_col(res, R)
z <- Rfast::colShuffle(z)
booty <- sqrt(s) * z + est
xx %*% booty
}
4 changes: 2 additions & 2 deletions R/many_regression_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ gammaregs <- function(y, x, tol = 1e-07, logged = FALSE, parallel = FALSE, maxit

#[export]
logiquant.regs <- function(y, x, logged = FALSE) {
m <- Rfast::med(y)
m <- Rfast::Median(y)
y[y > m] <- 1
y[y != 1] <- 0
Rfast::univglms(y, x, oiko = "binomial", logged = logged)
Expand Down Expand Up @@ -138,7 +138,7 @@ score.zipregs <- function(y, x, logged = FALSE) {

#[export]
negbin.regs <- function (y, x, type = 1, tol = 1e-07, logged = FALSE, parallel = FALSE, maxiters = 100) {
mod <- .Call("Rfast2_negbin_regs", y, x, tol, maxiters, parallel)$info
mod <- .Call(Rfast2_negbin_regs, y, x, tol, maxiters, parallel)$info
ini <- Rfast::negbin.mle(y, type = type)$loglik
stat <- 2 * (mod - ini)
pvalue <- pchisq(stat, 1, lower.tail = FALSE, log.p = logged)
Expand Down
4 changes: 2 additions & 2 deletions R/naive.bayes.classifiers.R
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ nb.cv <- function(x, ina, type = "gaussian", folds = NULL, nfolds = 10,
runs <- sapply(names, function(x) NULL)
if (!is.null(seed))
set.seed(seed)
oop <- options(warn = -1)
on.exit(options(oop))
#oop <- options(warn = -1)
#on.exit(options(oop))
if (!stratified) {
rat <- length(ina)%%nfolds
mat <- matrix(Rfast2::Sample.int(length(ina)), ncol = nfolds)
Expand Down
23 changes: 23 additions & 0 deletions R/normal.etest.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#[export]
normal.etest <- function(x, R = 999) {
n <- length(x)
s <- Rfast::Var(x, std = TRUE)
y <- ( x - mean(x) ) / s
y <- sort(y)
K <- seq(1 - n, n - 1, 2)
stat <- 4 * sum( y * pnorm(y) + dnorm(y) ) - 2 * mean(K * y)

z <- Rfast::matrnorm(n, R)
z <- Rfast::standardise(z)
z <- Rfast::colSort(z)
bootstat <- 4 * Rfast::colsums( z * pnorm(z) ) +
4 * Rfast::colsums( exp(-0.5 * z^2) ) / sqrt(2 * pi) -
2 * Rfast::eachcol.apply(z, K) / n
pvalue <- ( sum(bootstat > stat) + 1 ) / (R + 1)
res <- c(stat - 2 * n / sqrt(pi), pvalue)
names(res) <- c("statistic", "p-value")
res
}



Loading

0 comments on commit 645fdad

Please sign in to comment.