diff --git a/.Rbuildignore b/.Rbuildignore index 2666e2b..53b253f 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,10 +1,12 @@ +^.*\.Rproj$ +^\.Rproj\.user$ ^renv$ ^renv\.lock$ -^bootGOF\.Rproj$ -^\.Rproj\.user$ -^_pkgdown\.yml$ -^docs$ -^pkgdown$ -^docker$ -^README\.Rmd$ +README.Rmd +Makefile +LICENSE design.plantuml +^\.github$ +_pkgdown.yml +docs/ +docker/ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/Features.yaml b/.github/workflows/Features.yaml new file mode 100644 index 0000000..7157d34 --- /dev/null +++ b/.github/workflows/Features.yaml @@ -0,0 +1,70 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [feature/**] + paths: [DESCRIPTION, .Rbuildignore, R/**, tests/**, inst/**, .github/**] + + +name: Feature-branch-checks + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: true + matrix: + config: + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + steps: + - uses: actions/checkout@v5 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: rcmdcheck, covr, tinytest, lintr + + # - name: Lint + # run: | + # library(tinytest) + # out <- lintr::lint_dir() + # if (0 < length(out)) stop("Linting failure") else print("Linting successful") + # shell: Rscript {0} + + - name: Coverage + run: | + library(tinytest) + roxygen2::roxygenize() + test_covr <- covr::percent_coverage(covr::package_coverage()) + if (test_covr < 100) stop(sprintf("Coverage of %s (<100) too low", lowest_covr_value)) + shell: Rscript {0} + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_: false + run: | + options(crayon.enabled = TRUE) + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..d46f42d --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,60 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [master, develop] + paths: [DESCRIPTION, .Rbuildignore, R/**, tests/**, inst/**, .github/**] + pull_request: + branches: [master, develop] + paths: [DESCRIPTION, .Rbuildignore, R/**, tests/**, inst/**, .github/**] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macOS-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v5 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: rcmdcheck + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_: false + run: | + options(crayon.enabled = TRUE) + roxygen2::roxygenize() + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + shell: Rscript {0} + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@main + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check diff --git a/.github/workflows/Test-coverage.yaml b/.github/workflows/Test-coverage.yaml new file mode 100644 index 0000000..4b769ff --- /dev/null +++ b/.github/workflows/Test-coverage.yaml @@ -0,0 +1,46 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [master, develop] + paths: [DESCRIPTION, .Rbuildignore, R/**, tests/**, inst/**, .github/**] + +name: Test coverage + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: true + matrix: + config: + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + steps: + - uses: actions/checkout@v5 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: covr, tinytest + + - name: Coverage + run: | + library(tinytest) + roxygen2::roxygenize() + covr::codecov() + shell: Rscript {0} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..796e3d0 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,37 @@ +# Workflow copied from simTool (which copied it from dplyr) +on: + push: + branches: [develop] + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v5 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: make pkgdown + shell: bash + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index c833a2c..9fe2edb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,46 @@ -.Rproj.user +# History files .Rhistory +.Rapp.history + +# Session Data files .RData + +# User-specific files .Ruserdata -inst/doc + +# Example code in package build process +*-Ex.R + +# Output files from R CMD build +/*.tar.gz + +# Output files from R CMD check +/*.Rcheck/ + +# RStudio files +.Rproj.user/ + +# produced vignettes +vignettes/*.html +vignettes/*.pdf + +# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 +.httr-oauth + +# knitr and R markdown default cache directories +*_cache/ +/cache/ + +# Temporary files created by R markdown +*.utf8.md +*.knit.md + +# R Environment Variables +.Renviron + +# Roxygen generated files +NAMESPACE +man/ + +# pkgdown generated files +docs/ \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 781d39e..5818fc8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: bootGOF Title: Bootstrap Based Goodness-of-Fit Tests -Version: 0.1.0 +Version: 0.1.1 Authors@R: c(person(given = "Marsel", family = "Scheer", @@ -28,15 +28,13 @@ Imports: R6 (>= 2.4.1) License: GPL-3 Encoding: UTF-8 -RoxygenNote: 7.1.0 +RoxygenNote: 7.3.2 URL: https://github.com/MarselScheer/bootGOF BugReports: https://github.com/MarselScheer/bootGOF/issues Suggests: - testthat, covr, roxygen2, pkgdown, - devtools, tinytest, mockery, knitr, diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..878a61b --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +SHELL := /bin/bash +PKGNAME=bootGOF + +help: + -@ echo "R-cmd-check: Builds and checks (--as-cran) the Rpkg" + -@ echo "test: Executes all unit-tests" + -@ echo "lint: Starts linting" + -@ echo "README: Builds README.md" + -@ echo "pkgdown: Builds pkgdown site" + +NAMESPACE: R/* + Rscript -e "roxygen2::roxygenize()" + +R-cmd-check: NAMESPACE + R CMD build . + R CMD check --as-cran --no-manual $(PKGNAME)*.tar.gz + make clean-pkg-build-file + make clean-cmd-check-files + +clean-pkg-build-file: + rm $(PKGNAME)*tar.gz + +clean-cmd-check-files: + rm -rf $(PKGNAME).Rcheck + +test: NAMESPACE + Rscript -e "pkgload::load_all(); tinytest::test_all()" + +coverage: NAMESPACE + Rscript -e "pkgload::load_all(); covr::package_coverage(type = 'tests')" + +lint: + Rscript -e "library(tinytest); pkgload::load_all(); lintr::lint_package()" + +pkgdown: NAMESPACE + Rscript -e "library(pkgdown); pkgdown::build_site_github_pages(new_process=FALSE, install=FALSE)" + +README: + Rscript -e "pkgload::load_all(); rmarkdown::render(input='README.Rmd', output_format='md_document')" diff --git a/NAMESPACE b/NAMESPACE index fe19901..2828b09 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -16,3 +16,4 @@ export(GOF_sim_wild_rademacher) export(Rn1_CvM) export(Rn1_KS) export(Rn1_statistic) +importFrom(R6,R6Class) diff --git a/NEWS.md b/NEWS.md index 748f89f..c3cc523 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +Version 0.1.1 +========================= + +* fix a warning/note that appears due to cran-checks. Actually I followed roxygen2 documentation about the imports, however the R-cmd-check of cran complains, so a uneccessary import was added to the rd-files. + Version 0.1.0 ========================= @@ -5,4 +10,4 @@ Version 0.1.0 * classical linear models and GLMs can be tested out of the box * interfaces defined and documented in order to - reuse the resampling schemes for other models \ No newline at end of file + reuse the resampling schemes for other models diff --git a/R/GOF_model.R b/R/GOF_model.R index 6795738..344dc92 100644 --- a/R/GOF_model.R +++ b/R/GOF_model.R @@ -47,12 +47,12 @@ ##' y_name = "y", ##' Rn1_statistic = Rn1_KS$new()) ##' mt$get_pvalue() -GOF_model <- function(model, +GOF_model <- function(model, # nolint data, nmb_boot_samples, simulator_type, y_name, - Rn1_statistic, + Rn1_statistic, # nolint gof_model_resample_class = GOF_model_resample, gof_model_test_class = GOF_model_test ) { @@ -61,7 +61,10 @@ GOF_model <- function(model, choices = c("parametric", "semi_parametric_rademacher")) checkmate::assert_multi_class(x = model, classes = c("lm", "glm")) if (inherits(x = model, what = "negbin")) { - warning("The GOF-test requires to refit the model. Refitting MASS::glm.nb can be problematic, see vignette New-Models") + warning(paste( + "The GOF-test requires to refit the model.", + "Refitting MASS::glm.nb can be problematic, see vignette New-Models" + )) } @@ -75,8 +78,8 @@ GOF_model <- function(model, semi_parametric_rademacher = list( new = function() stop( paste( - "Ordinary Least Square estimate necessary for semi_parameteric_rademacher.", - "But MLE is used for GLMs." + "Ordinary Least Square estimate necessary for", + "semi_parameteric_rademacher. But MLE is used for GLMs." ))) ) ) @@ -88,7 +91,7 @@ GOF_model <- function(model, } else if (inherits(x = model, what = "lm")) { mt <- GOF_lm_trainer$new() mie <- GOF_lm_info_extractor$new() - + if (simulator_type == "parametric") { ms <- simulators[["lm"]][[simulator_type]]$new() } else { diff --git a/R/GOF_model_info_extractor.R b/R/GOF_model_info_extractor.R index ce3dd0c..555b19b 100644 --- a/R/GOF_model_info_extractor.R +++ b/R/GOF_model_info_extractor.R @@ -3,7 +3,7 @@ ##' @description R6 does not offer interfaces. Hence all methods ##' are considered as abstract. ##' @export -GOF_model_info_extractor <- R6::R6Class( +GOF_model_info_extractor <- R6::R6Class( # nolint classname = "GOF_model_info_extractor", public = list( ##' @description Abstract function that estimates/predicts the @@ -36,7 +36,7 @@ GOF_model_info_extractor <- R6::R6Class( ##' @description This class is specialized in extracting various information ##' from an object of class "lm" ##' @export -GOF_lm_info_extractor = R6::R6Class( +GOF_lm_info_extractor <- R6::R6Class( # nolint classname = "GOF_lm_info_extractor", inherit = GOF_model_info_extractor, public = list( @@ -65,7 +65,7 @@ GOF_lm_info_extractor = R6::R6Class( ##' @description This class is specialized in extracting various information ##' from an object of class "glm" ##' @export -GOF_glm_info_extractor = R6::R6Class( +GOF_glm_info_extractor <- R6::R6Class( # nolint classname = "GOF_glm_info_extractor", inherit = GOF_model_info_extractor, public = list( diff --git a/R/GOF_model_resample.R b/R/GOF_model_resample.R index 708c62a..0cab344 100644 --- a/R/GOF_model_resample.R +++ b/R/GOF_model_resample.R @@ -4,11 +4,13 @@ ##' @description Class is able to resample model fit, i.e. generate a ##' new data set and refit the model to the new data. ##' @export -GOF_model_resample <- R6::R6Class( +GOF_model_resample <- R6::R6Class( # nolint classname = "GOF_model_resample", public = list( - ##' @param gof_model_simulator an instance that implements \link{GOF_model_simulator} - ##' @param gof_model_trainer an instance that implements \link{GOF_model_trainer} + ##' @param gof_model_simulator an instance that implements + ##' \link{GOF_model_simulator} + ##' @param gof_model_trainer an instance that implements + ##' \link{GOF_model_trainer} ##' @return No explicit return initialize = function(gof_model_simulator, gof_model_trainer) { private$model_simulator <- gof_model_simulator diff --git a/R/GOF_model_simulator.R b/R/GOF_model_simulator.R index 5e815b3..dd52d6e 100644 --- a/R/GOF_model_simulator.R +++ b/R/GOF_model_simulator.R @@ -3,7 +3,7 @@ ##' @description R6 does not offer interfaces. Hence all methods ##' are considered as abstract. ##' @export -GOF_model_simulator <- R6::R6Class( +GOF_model_simulator <- R6::R6Class( # nolint classname = "GOF_model_simulator", public = list( ##' @description Abstract function that resamples/generates @@ -22,7 +22,7 @@ GOF_model_simulator <- R6::R6Class( ##' of the dependent variable is fully specified and used here ##' to generate new depenedent variables that follow \code{model} ##' @export -GOF_lm_sim_param <- R6::R6Class( +GOF_lm_sim_param <- R6::R6Class( # nolint classname = "GOF_lm_sim_param", ##' @description generates/resamples the dependent variables based ##' on the parameteric nature defined by \code{model} @@ -30,7 +30,7 @@ GOF_lm_sim_param <- R6::R6Class( ##' @return see \link{GOF_model_simulator} public = list( resample_y = function(model) { - simulate(model)[,1] + simulate(model)[, 1] })) @@ -38,6 +38,7 @@ GOF_lm_sim_param <- R6::R6Class( ##' ##' @param n number of random variables to be generated ##' @return vector of values following the Rademacher distribution +##' @keywords internal rrademacher <- function(n) { ret <- 2 * stats::rbinom(n = n, size = 1, prob = 0.5) - 1 return(ret) @@ -49,13 +50,13 @@ rrademacher <- function(n) { ##' Rademacher random variables are used to add or substract ##' the residuals from the fitted values. ##' @export -GOF_sim_wild_rademacher <- R6::R6Class( +GOF_sim_wild_rademacher <- R6::R6Class( # nolint classname = "GOF_sim_wild_rademacher", public = list( ##' @param gof_model_info_extractor the info extractor that is used ##' to derive the residuals and fitted values for resampling. initialize = function(gof_model_info_extractor) { - private$model_info_extractor = gof_model_info_extractor + private$model_info_extractor <- gof_model_info_extractor }, ##' @description a wild bootstrap using Rademacher random ##' variables to resample the dependent variable @@ -81,12 +82,12 @@ GOF_sim_wild_rademacher <- R6::R6Class( ##' of the dependent variable is fully specified and used here ##' to generate new depenedent variables that follow \code{model} ##' @export -GOF_glm_sim_param <- R6::R6Class( +GOF_glm_sim_param <- R6::R6Class( # nolint classname = "GOF_glm_sim_param", public = list( ##' @description see \link{GOF_model_simulator} ##' @param model see \link{GOF_model_simulator} ##' @return see \link{GOF_model_simulator} resample_y = function(model) { - simulate(model)[,1] + simulate(model)[, 1] })) diff --git a/R/GOF_model_test.R b/R/GOF_model_test.R index b9a107a..24a2ec2 100644 --- a/R/GOF_model_test.R +++ b/R/GOF_model_test.R @@ -4,7 +4,7 @@ ##' a particular linear model, i.e. classical linear models, generalized ##' linear models or models of the type \eqn{m(\beta^\top X) + \epsilon}. ##' @export -GOF_model_test <- R6::R6Class( +GOF_model_test <- R6::R6Class( # nolint classname = "GOF_model_test", public = list( ##' @param model a fitted model @@ -27,28 +27,30 @@ GOF_model_test <- R6::R6Class( data, nmb_boot_samples, y_name, - Rn1_statistic, + Rn1_statistic, # nolint gof_model_info_extractor, gof_model_resample) { checkmate::assert_count(x = nmb_boot_samples, positive = TRUE) private$model_org <- model private$data_org <- data private$y_name <- y_name - private$Rn1_statistic <- Rn1_statistic + private$Rn1_statistic <- Rn1_statistic # nolint private$nmb_boot_samples <- nmb_boot_samples private$model_info_extractor <- gof_model_info_extractor private$model_resample <- gof_model_resample - private$order_beta_dot_X_org <- order( - private$model_info_extractor$beta_x_covariates(model = private$model_org) + private$order_beta_dot_X_org <- order( # nolint + private$model_info_extractor$beta_x_covariates( + model = private$model_org + ) ) - private$Rn1_statistic <- Rn1_statistic + private$Rn1_statistic <- Rn1_statistic # nolint }, ##' @description calculates the marked empricial process for \code{model} ##' @return vector ordered by the inner product of the estimated ##' parameter and the independent variables get_Rn1_org = function() { if (is.null(private$Rn1_org)) { - private$Rn1_org <- private$Rn1( + private$Rn1_org <- private$Rn1( # nolint y_minus_yhat = private$model_info_extractor$y_minus_yhat( model = private$model_org ), @@ -99,10 +101,12 @@ GOF_model_test <- R6::R6Class( model = private$model_org, data = private$data_org, y_name = private$y_name) - Rn1_boot <- private$Rn1( - y_minus_yhat = private$model_info_extractor$y_minus_yhat(model = fit_boot), + Rn1_boot <- private$Rn1( # nolint + y_minus_yhat = private$model_info_extractor$y_minus_yhat( + model = fit_boot + ), order_beta_x_covariates = private$order_beta_dot_X_org) return(Rn1_boot) } - private$Rn1_boot <- lapply(X = 1:private$nmb_boot_samples, FUN = f) + private$Rn1_boot <- lapply(X = 1:private$nmb_boot_samples, FUN = f) # nolint })) diff --git a/R/GOF_model_trainer.R b/R/GOF_model_trainer.R index 218b8f7..00538ca 100644 --- a/R/GOF_model_trainer.R +++ b/R/GOF_model_trainer.R @@ -2,8 +2,12 @@ ##' ##' @description R6 does not offer interfaces. Hence all methods ##' are considered as abstract. +##' According to https://roxygen2.r-lib.org/articles/namespace.html#imports +##' the R6Class import below is not necessary but we need it to +##' get rid of a warning from the CRAN check :-( +##' @importFrom R6 R6Class ##' @export -GOF_model_trainer <- R6::R6Class( +GOF_model_trainer <- R6::R6Class( # nolint classname = "GOF_model_trainer", public = list( ##' @description Abstract function refits the model to @@ -20,7 +24,7 @@ GOF_model_trainer <- R6::R6Class( ##' for linear models ##' @description refits an object of class "lm" to a new data set ##' @export -GOF_lm_trainer <- R6::R6Class( +GOF_lm_trainer <- R6::R6Class( # nolint classname = "GOF_lm_trainer", public = list( ##' @description see \link{GOF_model_trainer} @@ -35,7 +39,7 @@ GOF_lm_trainer <- R6::R6Class( ##' for generalized linear models ##' @description refits an object of class "glm" to a new data set ##' @export -GOF_glm_trainer <- R6::R6Class( +GOF_glm_trainer <- R6::R6Class( # nolint classname = "GOF_glm_trainer", public = list( ##' @description see \link{GOF_model_trainer} diff --git a/R/Rn1_statistic.R b/R/Rn1_statistic.R index 69b221c..031e46c 100644 --- a/R/Rn1_statistic.R +++ b/R/Rn1_statistic.R @@ -4,14 +4,14 @@ ##' @description R6 does not offer interfaces. Hence all methods ##' are considered as abstract. ##' @export -Rn1_statistic <- R6::R6Class( +Rn1_statistic <- R6::R6Class( # nolint classname = "Rn1_statistic", public = list( ##' @description Abstract function that calculates the statistic ##' for a given marked empirical process ##' @param Rn1 marked empirical process as a double vector ##' @return statistic based on \code{Rn1} - calc_statistic = function(Rn1) { + calc_statistic = function(Rn1) { # nolint stop("Abstract method. Needs to be implemented") }) ) @@ -21,14 +21,14 @@ Rn1_statistic <- R6::R6Class( ##' ##' @description Implements the "interface" Rn1_statistic ##' @export -Rn1_KS <- R6::R6Class( +Rn1_KS <- R6::R6Class( # nolint classname = "Rn1_KS", inherit = Rn1_statistic, public = list( ##' @description calculates the Kolmogorov-Smirnov-statistic ##' @param Rn1 see \link{Rn1_statistic} ##' @return see \link{Rn1_statistic} - calc_statistic = function(Rn1) { + calc_statistic = function(Rn1) { # nolint ret <- max(abs(Rn1)) return(ret) }) @@ -39,7 +39,7 @@ Rn1_KS <- R6::R6Class( ##' ##' @description Implements the "interface" Rn1_statistic ##' @export -Rn1_CvM <- R6::R6Class( +Rn1_CvM <- R6::R6Class( # nolint classname = "Rn1_CvM", inherit = Rn1_statistic, public = list( @@ -47,7 +47,7 @@ Rn1_CvM <- R6::R6Class( ##' statistic ##' @param Rn1 see \link{Rn1_statistic} ##' @return see \link{Rn1_statistic} - calc_statistic = function(Rn1) { + calc_statistic = function(Rn1) { # nolint ret <- mean(Rn1^2) return(ret) }) diff --git a/README.Rmd b/README.Rmd index b82b63b..6f8e167 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,23 +13,15 @@ knitr::opts_chunk$set( ``` -```{r badges, results='asis', echo=FALSE} -suppressPackageStartupMessages(library(badgecreatr)) -acc <- "MarselScheer" -repo <- "bootGOF" -branch <- "master" -status <- "active" -lifecycle <- "experimental" -badges <- list( - badge_travis(ghaccount = acc, ghrepo = repo, branch = branch), - badge_lifecycle(lifecycle = lifecycle), - badge_projectstatus(status = status), - badge_cran_version_ago(packagename = repo), - badge_cran_downloads(packagename = repo), - badge_license() - ) -cat(paste(badges, collapse = " ")) -``` +[![R build status](https://github.com/MarselScheer/bootGOF/workflows/R-CMD-check/badge.svg)](https://github.com/MarselScheer/bootGOF/actions) +[![Coverage Status](https://img.shields.io/codecov/c/github/MarselScheer/bootGOF/develop.svg)](https://app.codecov.io/github/MarselScheer/bootGOF?branch=develop) +[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html) +[![Project Status: Active – The project has reached a stable, usable +state and is being actively +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/bootGOF)](https://cran.r-project.org/package=bootGOF) +[![metacran downloads](https://cranlogs.r-pkg.org/badges/bootGOF)](https://cran.r-project.org/package=bootGOF) +[![license](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) # bootGOF @@ -103,6 +95,16 @@ or github devtools::install_github("MarselScheer/bootGOF") ``` +## Tests + +After installing the package you can execute the unit tests of the +package in your environment by calling: + +```{r, eval = FALSE} +library(tinytest) +tinytest::test_package("bootGOF") +``` + # sessionInfo ```{r} diff --git a/README.md b/README.md index 1407cbc..62757e9 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ - -[![Build -Status](https://travis-ci.org/MarselScheer/bootGOF.svg?branch=master)](https://travis-ci.org/MarselScheer/bootGOF) +[![R build +status](https://github.com/MarselScheer/bootGOF/workflows/R-CMD-check/badge.svg)](https://github.com/MarselScheer/bootGOF/actions) +[![Coverage +Status](https://img.shields.io/codecov/c/github/MarselScheer/bootGOF/develop.svg)](https://app.codecov.io/github/MarselScheer/bootGOF?branch=develop) [![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) -[![CRAN\_Status\_Badge\_version\_ago](https://www.r-pkg.org/badges/version-ago/bootGOF)](https://cran.r-project.org/package=bootGOF) +[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/bootGOF)](https://cran.r-project.org/package=bootGOF) [![metacran downloads](https://cranlogs.r-pkg.org/badges/bootGOF)](https://cran.r-project.org/package=bootGOF) [![license](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) @@ -17,7 +18,7 @@ downloads](https://cranlogs.r-pkg.org/badges/bootGOF)](https://cran.r-project.or Bootstrap based goodness-of-fit tests for (linear) models. Assume you have fitted a statistical model, e.g. classical linear model or generalized linear model or a model that follows -\(Y = m(\beta^\top X) + \epsilon\). This package allows to perform a +*Y* = *m*(*β*⊤*X*) + *ϵ*. This package allows to perform a rigorous statistical test to check if the chosen model family is correct. @@ -25,51 +26,45 @@ correct. First we generate a data-set in order to apply the package. -``` r -set.seed(1) -N <- 100 -X1 <- rnorm(N) -X2 <- rnorm(N) -d <- data.frame( - y = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)), - x1 = X1, - x2 = X2) -``` - -Note that both covariates influence the dependent variable \(Y\). Taking + set.seed(1) + N <- 100 + X1 <- rnorm(N) + X2 <- rnorm(N) + d <- data.frame( + y = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)), + x1 = X1, + x2 = X2) + +Note that both covariates influence the dependent variable *Y*. Taking only one of the covariates into account obviously leads to a model family that is not correct and the GOF-test should reveal that: -``` r -fit <- glm(y ~ x1, data = d, family = poisson()) - -library(bootGOF) -mt <- GOF_model( - model = fit, - data = d, - nmb_boot_samples = 100, - simulator_type = "parametric", - y_name = "y", - Rn1_statistic = Rn1_KS$new()) -mt$get_pvalue() -#> [1] 0 -``` + fit <- glm(y ~ x1, data = d, family = poisson()) + + library(bootGOF) + mt <- GOF_model( + model = fit, + data = d, + nmb_boot_samples = 100, + simulator_type = "parametric", + y_name = "y", + Rn1_statistic = Rn1_KS$new()) + mt$get_pvalue() + #> [1] 0 On the other hand assuming the correct model family should in general not be rejected by the GOF-test: -``` r -fit <- glm(y ~ x1 + x2, data = d, family = poisson()) -mt <- GOF_model( - model = fit, - data = d, - nmb_boot_samples = 100, - simulator_type = "parametric", - y_name = "y", - Rn1_statistic = Rn1_KS$new()) -mt$get_pvalue() -#> [1] 0.61 -``` + fit <- glm(y ~ x1 + x2, data = d, family = poisson()) + mt <- GOF_model( + model = fit, + data = d, + nmb_boot_samples = 100, + simulator_type = "parametric", + y_name = "y", + Rn1_statistic = Rn1_KS$new()) + mt$get_pvalue() + #> [1] 0.61 … @@ -77,45 +72,52 @@ mt$get_pvalue() You can install it from CRAN -``` r -install.packages("bootGOF") -``` + install.packages("bootGOF") or github -``` r -devtools::install_github("MarselScheer/bootGOF") -``` + devtools::install_github("MarselScheer/bootGOF") + +## Tests + +After installing the package you can execute the unit tests of the +package in your environment by calling: + + library(tinytest) + tinytest::test_package("bootGOF") # sessionInfo -``` r -sessionInfo() -#> R version 4.0.0 (2020-04-24) -#> Platform: x86_64-pc-linux-gnu (64-bit) -#> Running under: Ubuntu 20.04 LTS -#> -#> Matrix products: default -#> BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so -#> -#> locale: -#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C -#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 -#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C -#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C -#> [9] LC_ADDRESS=C LC_TELEPHONE=C -#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C -#> -#> attached base packages: -#> [1] stats graphics grDevices datasets utils methods base -#> -#> other attached packages: -#> [1] bootGOF_0.1.0 badgecreatr_0.2.0 -#> -#> loaded via a namespace (and not attached): -#> [1] digest_0.6.25 R6_2.4.1 backports_1.1.8 git2r_0.27.1 -#> [5] magrittr_1.5 evaluate_0.14 rlang_0.4.10 stringi_1.4.6 -#> [9] renv_0.10.0 checkmate_2.0.0 rmarkdown_2.3 tools_4.0.0 -#> [13] stringr_1.4.0 xfun_0.15 yaml_2.2.1 compiler_4.0.0 -#> [17] htmltools_0.5.0 knitr_1.29 -``` + sessionInfo() + #> R Under development (unstable) (2025-08-19 r88650) + #> Platform: x86_64-pc-linux-gnu + #> Running under: Ubuntu 24.04.2 LTS + #> + #> Matrix products: default + #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 + #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0 + #> + #> locale: + #> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C + #> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 + #> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 + #> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C + #> [9] LC_ADDRESS=C LC_TELEPHONE=C + #> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C + #> + #> time zone: Etc/UTC + #> tzcode source: system (glibc) + #> + #> attached base packages: + #> [1] stats graphics grDevices datasets utils methods base + #> + #> other attached packages: + #> [1] bootGOF_0.1.1 + #> + #> loaded via a namespace (and not attached): + #> [1] digest_0.6.37 desc_1.4.3 backports_1.5.0 R6_2.6.1 + #> [5] fastmap_1.2.0 xfun_0.53 knitr_1.50 htmltools_0.5.8.1 + #> [9] rmarkdown_2.29 cli_3.6.5 renv_1.1.5 withr_3.0.2 + #> [13] pkgload_1.4.0 compiler_4.6.0 rprojroot_2.1.0 tools_4.6.0 + #> [17] pkgbuild_1.4.8 checkmate_2.3.3 evaluate_1.0.4 yaml_2.3.10 + #> [21] rlang_1.1.6 diff --git a/_pkgdown.yml b/_pkgdown.yml index 84d0262..601ad3f 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -2,8 +2,7 @@ destination: docs title: bootGOF url: http://MarselScheer.github.io/bootGOF template: - params: - bootswatch: flatly + bootstrap: 5 reference: - title: "GOF-tests" - desc: > diff --git a/bootGOF.Rproj b/bootGOF.Rproj index bd6006f..aa6b2b9 100644 --- a/bootGOF.Rproj +++ b/bootGOF.Rproj @@ -15,3 +15,4 @@ LaTeX: pdfLaTeX BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageCheckArgs: --no-manual --as-cran diff --git a/docker/Dockerfile b/docker/Dockerfile index 80ba471..67f8f12 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM rocker/verse:4.0.0 +FROM rocker/tidyverse:devel RUN apt-get update && apt-get install -y \ ranger \ @@ -10,16 +10,21 @@ RUN apt-get update && apt-get install -y \ # by plantuml graphviz \ # xdg-utils and ff necessary to display -# drake-network-graphs +# drake-network-graphs from emacs xdg-utils \ firefox \ - && ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime \ - && git config --global user.email "scheer@freescience.de" \ - && git config --global user.name "Marsel Scheer" \ - && mv /root/.gitconfig /home/rstudio \ - && chown rstudio:rstudio /home/rstudio/.gitconfig \ - && usermod --shell /bin/bash rstudio \ -# create directory for mounting the host file system - && su -l rstudio -c "mkdir -p /tmp/hostfs" \ - && su -l rstudio -c "ln -s /tmp/hostfs /home/rstudio/hostfs" \ - && su -l rstudio -c "echo RENV_PATHS_ROOT=~/hostfs/renv/ > /home/rstudio/.Renviron" + && ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + +USER rstudio +WORKDIR /home/rstudio +RUN mkdir -p /tmp/hostfs \ + && ln -s /tmp/hostfs \ + && ln -s /tmp/hostfs/.emacs.d \ + && ln -s /tmp/hostfs/.gitconfig \ + && ln -s /tmp/hostfs/.ssh \ + && echo "export DISPLAY=:0" > /home/rstudio/.bashrc \ + && echo RENV_PATHS_ROOT=~/hostfs/renv/ > /home/rstudio/.Renviron + +# last command MUST be USER root?!? +# otherwise container will directly stop +USER root diff --git a/docker/Dockerfile.doom b/docker/Dockerfile.doom deleted file mode 100644 index ee82f48..0000000 --- a/docker/Dockerfile.doom +++ /dev/null @@ -1,17 +0,0 @@ -FROM rstudio:4.0.0 - -USER rstudio - -# install and configure doom-emacs -RUN git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d \ - && yes | ~/.emacs.d/bin/doom install \ - && mv ~/.doom.d ~/.doom.d.org \ - && git clone https://github.com/MarselScheer/.doom.d.git ~/.doom.d \ - && echo "(package! plantuml-mode)" >> ~/.doom.d/packages.el \ - && ~/.emacs.d/bin/doom sync \ - && echo '(setq plantuml-jar-path "/home/rstudio/hostfs/plantuml.jar")' >> ~/.doom.d/config.el \ - && echo "(setq plantuml-default-exec-mode 'jar)" >> ~/.doom.d/config.el - -# root at the end is need, otherwise -# container stops directly after start?!? -USER root diff --git a/docker/build.sh b/docker/build.sh deleted file mode 100755 index f866322..0000000 --- a/docker/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -sudo docker build -t rstudio:4.0.0 . diff --git a/docker/build_doom.sh b/docker/build_doom.sh deleted file mode 100755 index 01ab722..0000000 --- a/docker/build_doom.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -./build.sh -sudo docker build -t doom_r:4.0.0 -f Dockerfile.doom . diff --git a/docker/start.sh b/docker/start.sh index 34131ef..0fefb55 100755 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,5 +1,4 @@ -sudo docker run --rm -d -p 8787:8787 -e DISABLE_AUTH=true \ +sudo docker run -d -p 8787:8787 -e DISABLE_AUTH=true \ -v ~/docker_fs:/tmp/hostfs \ -v /tmp/.X11-unix:/tmp/.X11-unix \ - rstudio:4.0.0 - + rstudio_emacs:devel diff --git a/docker/start_doom.sh b/docker/start_doom.sh deleted file mode 100755 index 214edd8..0000000 --- a/docker/start_doom.sh +++ /dev/null @@ -1,15 +0,0 @@ -sudo docker run --rm -d -p 8787:8787 -e DISABLE_AUTH=true \ - -v ~/docker_fs:/tmp/hostfs \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - doom_r:4.0.0 - -# in order to display doom-emacs on the host: -# echo $DISPLAY -# xhost +local:'containerID' -# docker exec -it containerID /bin/bash -# su -l rstudio -# export DISPLAY= -# emacs - - - diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index ab20d99..0000000 --- a/docs/404.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - -Page not found (404) • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -Content not found. Please use links in the navbar. - -
- - - -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/articles/Architecture.html b/docs/articles/Architecture.html deleted file mode 100644 index 4ba40b7..0000000 --- a/docs/articles/Architecture.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - -Architecture • bootGOF - - - - - - - - - - -
-
- - - - -
-
- - - - -
-

-Class-diagram

-
-

Classdiagram

-
-
    -
  • -Rn1_statistics, GOF_model_info_extractor, GOF_model_simulator, GOF_sim_wild_rademacher and GOF_model_trainer follow the strategy pattern
  • -
  • -GOF_model_resample follow the template pattern.
  • -
-

Note that the object-oriented concepts are realized via the R6-package and that R6 actually does not have a real interface-functionality or abstract classes.

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

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - diff --git a/docs/articles/Architecture_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/Architecture_files/accessible-code-block-0.0.1/empty-anchor.js deleted file mode 100644 index ca349fd..0000000 --- a/docs/articles/Architecture_files/accessible-code-block-0.0.1/empty-anchor.js +++ /dev/null @@ -1,15 +0,0 @@ -// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> -// v0.0.1 -// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. - -document.addEventListener('DOMContentLoaded', function() { - const codeList = document.getElementsByClassName("sourceCode"); - for (var i = 0; i < codeList.length; i++) { - var linkList = codeList[i].getElementsByTagName('a'); - for (var j = 0; j < linkList.length; j++) { - if (linkList[j].innerHTML === "") { - linkList[j].setAttribute('aria-hidden', 'true'); - } - } - } -}); diff --git a/docs/articles/Architecture_files/figure-html/unnamed-chunk-1-1.png b/docs/articles/Architecture_files/figure-html/unnamed-chunk-1-1.png deleted file mode 100644 index bc76b6f..0000000 Binary files a/docs/articles/Architecture_files/figure-html/unnamed-chunk-1-1.png and /dev/null differ diff --git a/docs/articles/Architecture_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/Architecture_files/figure-html/unnamed-chunk-2-1.png deleted file mode 100644 index fe13239..0000000 Binary files a/docs/articles/Architecture_files/figure-html/unnamed-chunk-2-1.png and /dev/null differ diff --git a/docs/articles/New-Models.html b/docs/articles/New-Models.html deleted file mode 100644 index 34c59d4..0000000 --- a/docs/articles/New-Models.html +++ /dev/null @@ -1,335 +0,0 @@ - - - - - - - -New-Models • bootGOF - - - - - - - - - - -
-
- - - - -
-
- - - - -

Usually, one creates a GOF-model-test-class via the function GOF_model(). But this function is actually a wrapper for the class GOF_model_test. That class needs other classes to work properly. In particular it uses the three interfaces GOF_model_info_extractor, GOF_model_simulator, GOF_model_trainer. In general, objects of class lm or glm can be used with GOF_model. However, there might be situations where one has to overwrite the default behavior. For instance, if you want to apply the methodology to new models or simply because a model fit returned by an R-package does not work properly with the GOF-package. Here we show how to implement the three interfaces for some concret cases.

-
-

-Least square estimates

-

Assume we have such a model

-

\[ -Y = m(\beta^\top X) + \epsilon -\]

-

without any knowledge about \(\epsilon\). Then we could try to estimate the \(\beta\) using a least square estimate and using the GOF-package for check our fitted model. First we generate a data set

-
library(bootGOF)
-set.seed(1)
-X = runif(n = 200, min = 6, max = 14)
-d = data.frame(x = X, y = sin(0.5 * X) + rnorm(200, sd = 0.2))
-plot(y~x, data = d)
-

-

Lets have a short excursion at this point because the plot gives the impression that the following simple model might apply:

-
wrong_model = lm(y ~ I(x^2), data = d)
-

However, a goodness-of-fit-test rejects this model

-
mt <- GOF_model(
-  data = d,
-  model = wrong_model,
-  simulator_type = "parametric",
-  nmb_boot_samples = 100,
-  y_name = "y",
-  Rn1_statistic = Rn1_KS$new())
-mt$get_pvalue()
-#> [1] 0
-

Note that in this simple case the standard diagnostic plots also reveal that this model is not a sufficient. Now we fit the model using a least square estimator:

-
library(minpack.lm)
-fit <- minpack.lm::nlsLM(y ~ sin(a * x),
-  data = d,
-  start = c(a = 0.5),
-  control = nls.control(maxiter = 500))
-fit
-#> Nonlinear regression model
-#>   model: y ~ sin(a * x)
-#>    data: d
-#>      a 
-#> 0.4993 
-#>  residual sum-of-squares: 7.873
-#> 
-#> Number of iterations to convergence: 3 
-#> Achieved convergence tolerance: 1.49e-08
-

In order to create a goodnes-of-fit-test using GOF_model_test we have to implement three interfaces. The first interface requires that we implement three functions yhat, y_minus_yhat and beta_x_covariates, which are the predictions for the dependent variable (also called target-variable), the residuals on the scale of the dependent variable and the inner product of the estimated parameters and the independent variables (also called covariates or features). However, the object returned by minpack.lm::nlsLM does not contain the original data set but that data set is necessary to calculate the inner product. Hence, we make a list that contains the model fit and the data that was used to fit the model.

-
fit_and_data <- list(fit = fit, data = d)
-

Now we can implement the interface

-
library(R6)
-my_nls_info_extractor <- R6::R6Class(
-  classname = "my_nls_info_extractor",
-  inherit = GOF_model_info_extractor,
-  public = list(
-    yhat = function(model) {
-      predict(object = model$fit)
-    },
-    y_minus_yhat = function(model) {
-      residuals(object = model$fit)
-    },
-    beta_x_covariates = function(model) {
-      a_hat <- coef(object = model$fit)
-      x <- model$data$x
-      ret <- a_hat * x
-      return(ret)
-    }
-  ))
-my_info_extractor <- my_nls_info_extractor$new()
-

Implementing yhat and y_minus_yhat is straight forward using the function already offered by R but beta_x_covariates needs special attention. The reason is that minpack.lm::nlsLM can also fit very general models of the type \(m(\beta, X)\). Hence, there is now built-in-function to extract objects like \(\beta^\top X\). Lets look at the first few data points:

-
head(d)
-#>           x          y
-#> 1  8.124069 -0.9199426
-#> 2  8.976991 -0.9666172
-#> 3 10.582827 -1.0191812
-#> 4 13.265662  0.3741709
-#> 5  7.613455 -0.7480823
-#> 6 13.187117  0.6588717
-

Now we are able to predict \(y\):

-
head(my_info_extractor$yhat(model = fit_and_data))
-#> [1] -0.7926252 -0.9737135 -0.8407826  0.3343611 -0.6132205  0.2971500
-

And calculate the difference between \(y\) and our prediction:

-
head(my_info_extractor$y_minus_yhat(model = fit_and_data))
-#> [1] -0.127317499  0.007096259 -0.178398577  0.039809752 -0.134861797
-#> [6]  0.361721696
-

And based on the estimated coefficient we can calculate the inner product with \(x\):

-
head(my_info_extractor$beta_x_covariates(model = fit_and_data))
-#> [1] 4.056695 4.482596 5.284458 6.624113 3.801724 6.584892
-

Since we did not make an assumption about the distribution of \(\epsilon\) we cannot use a parametric resampling scheme. However, we can do a wild bootstrap that uses only the predictions and the residuals. The class GOF_sim_wild_rademacher implements this wild bootstrap but needs an info extractor to obtain the preditions and residuals:

-
my_simulator <- GOF_sim_wild_rademacher$new(
-  gof_model_info_extractor = my_info_extractor
-)
-

This class generates as many observations (according to the fitted model) as are contained in the data set used to fit the model.

-

Again looking at first at the original data points:

-
head(d)
-#>           x          y
-#> 1  8.124069 -0.9199426
-#> 2  8.976991 -0.9666172
-#> 3 10.582827 -1.0191812
-#> 4 13.265662  0.3741709
-#> 5  7.613455 -0.7480823
-#> 6 13.187117  0.6588717
-

Now lets look at new \(y\)s generated according to the fitted model, i.e. following a negative binomial distribution subject to the independent variables:

-
head(my_simulator$resample_y(model = fit_and_data))
-#> [1] -0.6653077 -0.9808097 -1.0191812  0.3741709 -0.4783588  0.6588717
-

Note that the resampled \(y\)’s sometimes equal the observed \(y\). The reason is that the this wild bootstrap performs ‘predictions +/- residual’ and only the sign is drawn at random.

-

Finally, we need to implement the interface GOF_model_trainer which requires a function refit that is able to update the model object by refitting it to a new data set. R already provides the necessary function, i.e. stats::update. However we combined the fitted model with the data set in a list and we need to take into account:

-
my_nls_trainer <- R6::R6Class(
-  classname = "GOF_nls_trainer",
-  inherit = GOF_model_trainer,
-  public = list(
-    refit = function(model, data) {
-      fit <- update(object = model$fit, data = data)
-      ret <- list(fit = fit, data = data)
-      return(ret)
-    }))
-my_trainer <- my_nls_trainer$new()
-

This implementation basically equals the implementation of GOF_lm/glm/_trainer. The only difference is that we again store the data with the fit because nlsLM() doesn’t do it for us.

-

Of course, fitting the model again to the original data set results in the same fitted model. With the defined classes we can now easily generate a new data set and refit the model to that new data set.

-
new_data <- d
-new_data$y <- my_simulator$resample_y(model = fit_and_data)
-my_trainer$refit(model = fit_and_data, data = new_data)$fit
-#> Nonlinear regression model
-#>   model: y ~ sin(a * x)
-#>    data: data
-#>      a 
-#> 0.4997 
-#>  residual sum-of-squares: 7.871
-#> 
-#> Number of iterations to convergence: 2 
-#> Achieved convergence tolerance: 1.49e-08
-

Now all ingredients are available for applying the Goodness-of-Fit test:

-
set.seed(1)
-mt <- GOF_model_test$new(
-  model = fit_and_data,
-  data = d,
-  nmb_boot_samples = 100,
-  y_name = "y",
-  Rn1_statistic = Rn1_CvM$new(),
-  gof_model_info_extractor = my_info_extractor,
-  gof_model_resample = GOF_model_resample$new(
-    gof_model_simulator = my_simulator,
-    gof_model_trainer = my_trainer
-  )
-)
-mt$get_pvalue()
-#> [1] 0.8
-
-
-

-Negative Binomial using the MASS-package

-

A negative binomial model is a generalized linear model. Furthermore, within R MASS::glm.nb returns an object of class glm and this package actually can process glm-classes. However, MASS::glm.nb seems to have a bug that prevents to propoerly update/refit such an object via the stats::update() function. We briefly illustrate this using an artificial data set:

-
library(MASS)
-set.seed(1)
-X1 <- rnorm(100)
-X2 <- rnorm(100)
-d <- data.frame(
-  y = MASS::rnegbin(n = 100, mu = exp(0.2 + X1 * 0.2 + X2 * 0.6), theta = 2),
-  x1 = X1,
-  x2 = X2)
-fit <- MASS::glm.nb(y~x1+x2, data = d)
-fit
-#> 
-#> Call:  MASS::glm.nb(formula = y ~ x1 + x2, data = d, init.theta = 1.561918046, 
-#>     link = log)
-#> 
-#> Coefficients:
-#> (Intercept)           x1           x2  
-#>      0.1905       0.1532       0.7696  
-#> 
-#> Degrees of Freedom: 99 Total (i.e. Null);  97 Residual
-#> Null Deviance:       144.3 
-#> Residual Deviance: 102.4     AIC: 317.5
-

Note that fit-object shows that the call contained the parameter init.theta which obviously was not provided by us. The problem is that this init.theta parameter is used by stats::update during refitting resampled data. So fitting resampled data and fitting the original data is slightly different from the perspective of the fitting algorithm. To circumvent this problem we can reimplement the corresponding interface as follows:

-
my_negbin_trainer <- R6::R6Class(
-  classname = "GOF_glmnb_trainer",
-  inherit = GOF_model_trainer,
-  public = list(
-    refit = function(model, data) {
-      MASS::glm.nb(formula = formula(model), data = data)
-    }))
-

This way we ensure that the original data set and resampled data set are fitted in the same way. Now we can create the GOF-test-class using this new refitting-class

-
set.seed(1)
-mt <- GOF_model_test$new(
-  model = fit,
-  data = d,
-  nmb_boot_samples = 100,
-  y_name = "y",
-  Rn1_statistic = Rn1_CvM$new(),
-  gof_model_info_extractor = GOF_glm_info_extractor$new(),
-  gof_model_resample = GOF_model_resample$new(
-    gof_model_simulator = GOF_glm_sim_param$new(),
-    gof_model_trainer = my_negbin_trainer$new()
-  )
-)
-mt$get_pvalue()
-#> [1] 0.36
-

Lets compare the result with the default GOF-test for glm’s

-
set.seed(1)
-mt2 <- GOF_model(
-  model = fit,
-  data = d,
-  nmb_boot_samples = 100,
-  simulator_type = "parametric",
-  y_name = "y",
-  Rn1_statistic = Rn1_CvM$new()
-)
-#> Warning in GOF_model(model = fit, data = d, nmb_boot_samples = 100,
-#> simulator_type = "parametric", : The GOF-test requires to refit the model.
-#> Refitting MASS::glm.nb can be problematic, see vignette New-Models
-mt2$get_pvalue()
-#> [1] 0.36
-

In this case the p-values do not differ. However, it could be different in other settings.

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

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - diff --git a/docs/articles/New-Models_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/New-Models_files/accessible-code-block-0.0.1/empty-anchor.js deleted file mode 100644 index ca349fd..0000000 --- a/docs/articles/New-Models_files/accessible-code-block-0.0.1/empty-anchor.js +++ /dev/null @@ -1,15 +0,0 @@ -// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> -// v0.0.1 -// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. - -document.addEventListener('DOMContentLoaded', function() { - const codeList = document.getElementsByClassName("sourceCode"); - for (var i = 0; i < codeList.length; i++) { - var linkList = codeList[i].getElementsByTagName('a'); - for (var j = 0; j < linkList.length; j++) { - if (linkList[j].innerHTML === "") { - linkList[j].setAttribute('aria-hidden', 'true'); - } - } - } -}); diff --git a/docs/articles/New-Models_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/New-Models_files/figure-html/unnamed-chunk-2-1.png deleted file mode 100644 index eef9d16..0000000 Binary files a/docs/articles/New-Models_files/figure-html/unnamed-chunk-2-1.png and /dev/null differ diff --git a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-1.png deleted file mode 100644 index 70a7d60..0000000 Binary files a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-1.png and /dev/null differ diff --git a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-2.png b/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-2.png deleted file mode 100644 index 5801d2e..0000000 Binary files a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-2.png and /dev/null differ diff --git a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-3.png b/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-3.png deleted file mode 100644 index ea01962..0000000 Binary files a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-3.png and /dev/null differ diff --git a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-4.png b/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-4.png deleted file mode 100644 index 3a59f85..0000000 Binary files a/docs/articles/New-Models_files/figure-html/unnamed-chunk-3-4.png and /dev/null differ diff --git a/docs/articles/class_diagram.svg b/docs/articles/class_diagram.svg deleted file mode 100644 index b91ab2b..0000000 --- a/docs/articles/class_diagram.svg +++ /dev/null @@ -1,87 +0,0 @@ -Rn1_statisticdouble calc_statistic(Rn1)Rn1_KSRn1_CvMGOF_model_simulatorresample_y(model)GOF_lm_sim_paramGOF_sim_wild_rademacherGOF_glm_sim_paramGOF_model_trainerrefit(model, data)GOF_lm_trainerGOF_glm_trainerGOF_model_info_extractordouble[] yhat(model)double[] y_minus_yhat(model)double[] beta_x_covariates(model)GOF_lm_info_extractorGOF_glm_info_extractorGOF_model_resampleGOF_model_simulatorGOF_model_trainerresample()GOF_model_testGOF_model_info_exctractorGOF_model_resample_skeleton RSSRn1_statistic Rn1_statdouble[] Rn1_orgdouble[] Rn1_bootdouble[] Rn1(y_minus_yhat, order_beta_x_covariates)get_Rn1_org()get_Rn1_boot()get_pvalue() \ No newline at end of file diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index a663ac9..0000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - -Articles • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
-

All vignettes

-

- -
-
Architecture
-
-
New-Models
-
-
-
-
-
- - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index a64334e..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - -Authors • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
    -
  • -

    Marsel Scheer. Author, maintainer. -

    -
  • -
  • -

    Gerhard Dikta. Author. -

    -
  • -
- -
- -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a85941..0000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573..0000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 36681a8..0000000 --- a/docs/index.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -Bootstrap Based Goodness-of-Fit Tests • bootGOF - - - - - - - - - - -
    -
    - - - - -
    -
    - - -
    - -

    Bootstrap based goodness-of-fit tests for (linear) models. Assume you have fitted a statistical model, e.g. classical linear model or generalized linear model or a model that follows Y = m(β⊤X) + ϵ. This package allows to perform a rigorous statistical test to check if the chosen model family is correct.

    -
    -

    -Example

    -

    First we generate a data-set in order to apply the package.

    -
    set.seed(1)
    -N <- 100
    -X1 <- rnorm(N)
    -X2 <- rnorm(N)
    -d <- data.frame(
    -  y = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)),
    -  x1 = X1,
    -  x2 = X2)
    -

    Note that both covariates influence the dependent variable Y. Taking only one of the covariates into account obviously leads to a model family that is not correct and the GOF-test should reveal that:

    -
    fit <- glm(y ~ x1, data = d, family = poisson())
    -
    -library(bootGOF)
    -mt <- GOF_model(
    -  model = fit,
    -  data = d,
    -  nmb_boot_samples = 100,
    -  simulator_type = "parametric",
    -  y_name = "y",
    -  Rn1_statistic = Rn1_KS$new())
    -mt$get_pvalue()
    -#> [1] 0
    -

    On the other hand assuming the correct model family should in general not be rejected by the GOF-test:

    -
    fit <- glm(y ~ x1 + x2, data = d, family = poisson())
    -mt <- GOF_model(
    -  model = fit,
    -  data = d,
    -  nmb_boot_samples = 100,
    -  simulator_type = "parametric",
    -  y_name = "y",
    -  Rn1_statistic = Rn1_KS$new())
    -mt$get_pvalue()
    -#> [1] 0.61
    -

    …

    -
    -
    -

    -Installation

    -

    You can install it from CRAN

    -
    install.packages("bootGOF")
    -

    or github

    -
    devtools::install_github("MarselScheer/bootGOF")
    -
    -
    -
    -

    -sessionInfo

    -
    sessionInfo()
    -#> R version 4.0.0 (2020-04-24)
    -#> Platform: x86_64-pc-linux-gnu (64-bit)
    -#> Running under: Ubuntu 20.04 LTS
    -#> 
    -#> Matrix products: default
    -#> BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so
    -#> 
    -#> locale:
    -#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
    -#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
    -#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
    -#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
    -#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
    -#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
    -#> 
    -#> attached base packages:
    -#> [1] stats     graphics  grDevices datasets  utils     methods   base     
    -#> 
    -#> other attached packages:
    -#> [1] bootGOF_0.1.0     badgecreatr_0.2.0
    -#> 
    -#> loaded via a namespace (and not attached):
    -#>  [1] digest_0.6.25   R6_2.4.1        backports_1.1.8 git2r_0.27.1   
    -#>  [5] magrittr_1.5    evaluate_0.14   rlang_0.4.10    stringi_1.4.6  
    -#>  [9] renv_0.10.0     checkmate_2.0.0 rmarkdown_2.3   tools_4.0.0    
    -#> [13] stringr_1.4.0   xfun_0.15       yaml_2.2.1      compiler_4.0.0 
    -#> [17] htmltools_0.5.0 knitr_1.29
    -
    - -
    - - -
    - - -
    - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/news/index.html b/docs/news/index.html deleted file mode 100644 index 751b359..0000000 --- a/docs/news/index.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - -Changelog • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    -Version 0.1.0 2021-06-24 -

    -
      -
    • initial release
    • -
    • classical linear models and GLMs can be tested out of the box
    • -
    • interfaces defined and documented in order to reuse the resampling schemes for other models
    • -
    -
    -
    - - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index c01e592..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,367 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -img { - max-width: 100%; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } -} - - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top;} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { - background-color: #f8f8f8; - color: #333; -} - -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -pre .img { - margin: 5px 0; -} - -pre .img img { - background-color: #fff; - display: block; - height: auto; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 7e7048f..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,108 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $(".examples, div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index a3be7bf..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,11 +0,0 @@ -pandoc: 2.7.3 -pkgdown: 1.5.1 -pkgdown_sha: ~ -articles: - Architecture: Architecture.html - New-Models: New-Models.html -last_built: 2021-09-02T16:08Z -urls: - reference: http://MarselScheer.github.io/bootGOF/reference - article: http://MarselScheer.github.io/bootGOF/articles - diff --git a/docs/reference/GOF_glm_info_extractor.html b/docs/reference/GOF_glm_info_extractor.html deleted file mode 100644 index 718229c..0000000 --- a/docs/reference/GOF_glm_info_extractor.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_info_extractor for - for generalized linear models — GOF_glm_info_extractor • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This class is specialized in extracting various information - from an object of class "glm"

    -
    - - - -

    Super class

    - -

    bootGOF::GOF_model_info_extractor -> GOF_glm_info_extractor

    -

    Methods

    - - -

    Public methods

    - - -

    Inherited methods -
      -
    -
    - -
    -

    Method yhat()

    -

    see GOF_model_info_extractor

    Usage

    -

    GOF_glm_info_extractor$yhat(model)

    - -

    Arguments

    -

    -

    Returns

    -

    see GOF_model_info_extractor

    -


    -

    Method y_minus_yhat()

    -

    see GOF_model_info_extractor

    Usage

    -

    GOF_glm_info_extractor$y_minus_yhat(model)

    - -

    Arguments

    -

    -

    Returns

    -

    see GOF_model_info_extractor

    -


    -

    Method beta_x_covariates()

    -

    see GOF_model_info_extractor

    Usage

    -

    GOF_glm_info_extractor$beta_x_covariates(model)

    - -

    Arguments

    -

    -

    Returns

    -

    see GOF_model_info_extractor

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_glm_info_extractor$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_glm_sim_param.html b/docs/reference/GOF_glm_sim_param.html deleted file mode 100644 index 5443ca8..0000000 --- a/docs/reference/GOF_glm_sim_param.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_simulator for - for generalized linear models — GOF_glm_sim_param • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    after the GLM was fitted the distribution of the - of the dependent variable is fully specified and used here - to generate new depenedent variables that follow model

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method resample_y()

    -

    see GOF_model_simulator

    Usage

    -

    GOF_glm_sim_param$resample_y(model)

    - -

    Arguments

    -

    -
    model

    see GOF_model_simulator

    - -

    -

    Returns

    -

    see GOF_model_simulator

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_glm_sim_param$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_glm_trainer.html b/docs/reference/GOF_glm_trainer.html deleted file mode 100644 index 1f9a38a..0000000 --- a/docs/reference/GOF_glm_trainer.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_trainer for - for generalized linear models — GOF_glm_trainer • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    refits an object of class "glm" to a new data set

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method refit()

    -

    see GOF_model_trainer

    Usage

    -

    GOF_glm_trainer$refit(model, data)

    - -

    Arguments

    -

    -
    model

    see GOF_model_trainer

    - -
    data

    see GOF_model_trainer

    - -

    -

    Returns

    -

    see GOF_model_trainer

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_glm_trainer$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_lm_info_extractor.html b/docs/reference/GOF_lm_info_extractor.html deleted file mode 100644 index b5bf88c..0000000 --- a/docs/reference/GOF_lm_info_extractor.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_info_extractor - for linear models — GOF_lm_info_extractor • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This class is specialized in extracting various information - from an object of class "lm"

    -
    - - - -

    Super class

    - -

    bootGOF::GOF_model_info_extractor -> GOF_lm_info_extractor

    -

    Methods

    - - -

    Public methods

    - - -

    Inherited methods -
      -
    -
    - -
    -

    Method yhat()

    -

    see GOF_model_info_extractor

    Usage

    -

    GOF_lm_info_extractor$yhat(model)

    - -

    Arguments

    -

    -

    Returns

    -

    see GOF_model_info_extractor

    -


    -

    Method y_minus_yhat()

    -

    see GOF_model_info_extractor

    Usage

    -

    GOF_lm_info_extractor$y_minus_yhat(model)

    - -

    Arguments

    -

    -

    Returns

    -

    see GOF_model_info_extractor

    -


    -

    Method beta_x_covariates()

    -

    see GOF_model_info_extractor

    Usage

    -

    GOF_lm_info_extractor$beta_x_covariates(model)

    - -

    Arguments

    -

    -

    Returns

    -

    see GOF_model_info_extractor

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_lm_info_extractor$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_lm_sim_param.html b/docs/reference/GOF_lm_sim_param.html deleted file mode 100644 index 0649560..0000000 --- a/docs/reference/GOF_lm_sim_param.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_simulator for - for linear models — GOF_lm_sim_param • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    after the classical linear model was fitted the - normal distribution of the - of the dependent variable is fully specified and used here - to generate new depenedent variables that follow model

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method resample_y()

    -

    generates/resamples the dependent variables based - on the parameteric nature defined by model

    Usage

    -

    GOF_lm_sim_param$resample_y(model)

    - -

    Arguments

    -

    -
    model

    see GOF_model_simulator

    - -

    -

    Returns

    -

    see GOF_model_simulator

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_lm_sim_param$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_lm_sim_wild_rademacher.html b/docs/reference/GOF_lm_sim_wild_rademacher.html deleted file mode 100644 index 727fce3..0000000 --- a/docs/reference/GOF_lm_sim_wild_rademacher.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_simulator for - for linear models — GOF_lm_sim_wild_rademacher • GOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Rademacher random variables are used to change -add or substract the residuals from the fitted values

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method resample_y()

    -

    a wild bootstrap using Rademacher random - variables to resample the dependent variable

    Usage

    -

    GOF_lm_sim_wild_rademacher$resample_y(model)

    - -

    Arguments

    -

    -
    model

    see GOF_model_simulator

    - -

    -

    Returns

    -

    see GOF_model_simulator

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_lm_sim_wild_rademacher$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_lm_trainer.html b/docs/reference/GOF_lm_trainer.html deleted file mode 100644 index f267b0f..0000000 --- a/docs/reference/GOF_lm_trainer.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_trainer for - for linear models — GOF_lm_trainer • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    refits an object of class "lm" to a new data set

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method refit()

    -

    see GOF_model_trainer

    Usage

    -

    GOF_lm_trainer$refit(model, data)

    - -

    Arguments

    -

    -
    model

    see GOF_model_trainer

    - -
    data

    see GOF_model_trainer

    - -

    -

    Returns

    -

    see GOF_model_trainer

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_lm_trainer$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model.html b/docs/reference/GOF_model.html deleted file mode 100644 index c3d1e77..0000000 --- a/docs/reference/GOF_model.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - -Convenience function for creating a GOF-test for statistical models — GOF_model • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Simplifies the creation of an instance of - GOF_model_test, the actual work horse for performing a - goodness-of-fit-test.

    -
    - -
    GOF_model(
    -  model,
    -  data,
    -  nmb_boot_samples,
    -  simulator_type,
    -  y_name,
    -  Rn1_statistic,
    -  gof_model_resample_class = GOF_model_resample,
    -  gof_model_test_class = GOF_model_test
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    model

    of class 'lm' or 'glm'. Caution with MASS::glm.nb, see -vignette 'New-Models' for more details.

    data

    see GOF_model_test

    nmb_boot_samples

    see GOF_model_test

    simulator_type

    either "parameteric" or "semi_parameteric_rademacher"

    y_name

    see GOF_model_test

    Rn1_statistic

    see GOF_model_test

    gof_model_resample_class

    no need to change this parameter. Here the -class used for resampling the model (GOF_model_resample) -is injected. This parameter simply makes it easier to test the -convenience function properly.

    gof_model_test_class

    no need to change this parameter. Here the -class used for performing the GOF test (GOF_model_test) -is injected. This parameter simply makes it easier to test the -convenience function properly.

    - -

    Value

    - -

    instance of GOF_model_test

    - -

    Examples

    -
    set.seed(1) -N <- 100 -X1 <- rnorm(N) -X2 <- rnorm(N) -d <- data.frame( - y = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)), - x1 = X1, - x2 = X2) -fit <- glm(y ~ x1, data = d, family = poisson()) -mt <- GOF_model( - model = fit, - data = d, - nmb_boot_samples = 100, - simulator_type = "parametric", - y_name = "y", - Rn1_statistic = Rn1_KS$new()) -mt$get_pvalue()
    #> [1] 0
    fit <- glm(y ~ x1 + x2, data = d, family = poisson()) -mt <- GOF_model( - model = fit, - data = d, - nmb_boot_samples = 100, - simulator_type = "parametric", - y_name = "y", - Rn1_statistic = Rn1_KS$new()) -mt$get_pvalue()
    #> [1] 0.61
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model_info_extractor.html b/docs/reference/GOF_model_info_extractor.html deleted file mode 100644 index 2eea30b..0000000 --- a/docs/reference/GOF_model_info_extractor.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - -R6 Class representing model information — GOF_model_info_extractor • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    R6 does not offer interfaces. Hence all methods -are considered as abstract.

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method yhat()

    -

    Abstract function that estimates/predicts the - the dependent variable in model

    Usage

    -

    GOF_model_info_extractor$yhat(model)

    - -

    Arguments

    -

    -
    model

    fitted model

    - -

    -

    Returns

    -

    estimate/prediction of the dependent variable - fitted by model

    -


    -

    Method y_minus_yhat()

    -

    abstract function that calculates the residuals - on the scale of the dependent variable.

    Usage

    -

    GOF_model_info_extractor$y_minus_yhat(model)

    - -

    Arguments

    -

    -
    model

    fitted model

    - -

    -

    Returns

    -

    residuals on the scale of the dependent variable

    -


    -

    Method beta_x_covariates()

    -

    abstract function that calculates the inner product - of estimated parameters and the independent variables.

    Usage

    -

    GOF_model_info_extractor$beta_x_covariates(model)

    - -

    Arguments

    -

    -
    model

    fitted model

    - -

    -

    Returns

    -

    inner product of the estimated parameters and the - independent variables.

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_model_info_extractor$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model_resample.html b/docs/reference/GOF_model_resample.html deleted file mode 100644 index b133cc5..0000000 --- a/docs/reference/GOF_model_resample.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - -R6 Class representing the resampling scheme for -Goodness-of-fit-tests for (linear) models — GOF_model_resample • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Class is able to resample model fit, i.e. generate a - new data set and refit the model to the new data.

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method new()

    - -

    Usage

    -

    GOF_model_resample$new(gof_model_simulator, gof_model_trainer)

    - -

    Arguments

    -

    -
    gof_model_simulator

    an instance that implements GOF_model_simulator

    - -
    gof_model_trainer

    an instance that implements GOF_model_trainer

    - -

    -

    Returns

    -

    No explicit return

    -


    -

    Method resample()

    -

    resamples the dependent variable in data and refits - model to that new data set

    Usage

    -

    GOF_model_resample$resample(model, data, y_name)

    - -

    Arguments

    -

    -
    model

    fitted model based on data

    - -
    data

    used to fit model

    - -
    y_name

    string specifying the name of the dependent variable

    - -

    -

    Returns

    -

    a resampled version of model

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_model_resample$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model_simulator.html b/docs/reference/GOF_model_simulator.html deleted file mode 100644 index c668dca..0000000 --- a/docs/reference/GOF_model_simulator.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - -R6 Class representing a generator/resample of the dependent variable — GOF_model_simulator • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    R6 does not offer interfaces. Hence all methods - are considered as abstract.

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method resample_y()

    -

    Abstract function that resamples/generates - the dependent variable

    Usage

    -

    GOF_model_simulator$resample_y(model)

    - -

    Arguments

    -

    -
    model

    fitted model

    - -

    -

    Returns

    -

    generates the dependent variable according to - the model

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_model_simulator$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model_test.html b/docs/reference/GOF_model_test.html deleted file mode 100644 index 6fb09d3..0000000 --- a/docs/reference/GOF_model_test.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - -R6 Class representing the Goodness-of-Fit test - for (linear) models. — GOF_model_test • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This class can test the null hypothesis that data follows - a particular linear model, i.e. classical linear models, generalized - linear models or models of the type \(m(\beta^\top X) + \epsilon\).

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method new()

    - -

    Usage

    -

    GOF_model_test$new(
    -  model,
    -  data,
    -  nmb_boot_samples,
    -  y_name,
    -  Rn1_statistic,
    -  gof_model_info_extractor,
    -  gof_model_resample
    -)

    - -

    Arguments

    -

    -
    model

    a fitted model

    - -
    data

    used to fit model

    - -
    nmb_boot_samples

    integer specifying the number of bootstrap -samples to perform

    - -
    y_name

    string specifying the name of the dependent variable in -in data

    - -
    Rn1_statistic

    statistic used to map the marked empirical -process to the real line. Needs to be an instance of the class -that implements Rn1_statistic

    - -
    gof_model_info_extractor

    an instance that implements -GOF_model_info_extractor in order to apply it to -model

    - -
    gof_model_resample

    an instance that implements -GOF_model_resample in order to apply it to -model

    - -

    -

    Returns

    -

    An instance of the Class

    -


    -

    Method get_Rn1_org()

    -

    calculates the marked empricial process for model

    Usage

    -

    GOF_model_test$get_Rn1_org()

    - -

    Returns

    -

    vector ordered by the inner product of the estimated - parameter and the independent variables

    -


    -

    Method get_Rn1_boot()

    -

    calculates the marked empricial process for the - resampled versions of model

    Usage

    -

    GOF_model_test$get_Rn1_boot()

    - -

    Returns

    -

    list of length nmb_boot_samples where every element - is a vector ordered by the inner product of the estimated - parameter and the dependent variables

    -


    -

    Method get_pvalue()

    -

    p-value for Goodness-of-Fit-test for model

    Usage

    -

    GOF_model_test$get_pvalue()

    - -

    Returns

    -

    p-value for the null hypothesis that the dependent variable - was generated according to model

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_model_test$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model_test_injector.html b/docs/reference/GOF_model_test_injector.html deleted file mode 100644 index df7468c..0000000 --- a/docs/reference/GOF_model_test_injector.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - -Creates a GOF-model-test-class — GOF_model_test_injector • GOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Simplifies the creation of a GOF-model-test-class

    -
    - -
    GOF_model_test_injector(
    -  model,
    -  data,
    -  nmb_boot_samples,
    -  simulator_type,
    -  y_name,
    -  Rn1_statistic,
    -  gof_model_resample_class,
    -  gof_model_test_class
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    model

    see GOF_model_test

    data

    see GOF_model_test

    nmb_boot_samples

    see GOF_model_test

    simulator_type

    see GOF_model

    y_name

    see GOF_model_test

    Rn1_statistic

    see GOF_model_test

    gof_model_resample_class

    GOF_model_resample class

    gof_model_test_class

    GOF_model_test class

    - -

    Value

    - -

    instance of GOF_model_test

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_model_trainer.html b/docs/reference/GOF_model_trainer.html deleted file mode 100644 index 6d5da6b..0000000 --- a/docs/reference/GOF_model_trainer.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - -R6 Class representing a trainer for fitting models — GOF_model_trainer • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    R6 does not offer interfaces. Hence all methods -are considered as abstract.

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method refit()

    -

    Abstract function refits the model to - a new data set

    Usage

    -

    GOF_model_trainer$refit(model, data)

    - -

    Arguments

    -

    -
    model

    fitted model

    - -
    data

    used for refitting the model

    - -

    -

    Returns

    -

    model refitted on data

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_model_trainer$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/GOF_sim_wild_rademacher.html b/docs/reference/GOF_sim_wild_rademacher.html deleted file mode 100644 index 6dfd41b..0000000 --- a/docs/reference/GOF_sim_wild_rademacher.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - -Implements the "interface" GOF_model_simulator - in a semi-parametric fashion — GOF_sim_wild_rademacher • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This is a model agnostic resampling class, where -Rademacher random variables are used to add or substract -the residuals from the fitted values.

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method new()

    - -

    Usage

    -

    GOF_sim_wild_rademacher$new(gof_model_info_extractor)

    - -

    Arguments

    -

    -
    gof_model_info_extractor

    the info extractor that is used -to derive the residuals and fitted values for resampling.

    - -

    -


    -

    Method resample_y()

    -

    a wild bootstrap using Rademacher random - variables to resample the dependent variable

    Usage

    -

    GOF_sim_wild_rademacher$resample_y(model)

    - -

    Arguments

    -

    -
    model

    see GOF_model_simulator

    - -

    -

    Returns

    -

    see GOF_model_simulator

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    GOF_sim_wild_rademacher$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/Rn1_CvM.html b/docs/reference/Rn1_CvM.html deleted file mode 100644 index 0c4482d..0000000 --- a/docs/reference/Rn1_CvM.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - -Cramer-von-Mises-statistic for marked empirical - process — Rn1_CvM • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Implements the "interface" Rn1_statistic

    -
    - - - -

    Super class

    - -

    bootGOF::Rn1_statistic -> Rn1_CvM

    -

    Methods

    - - -

    Public methods

    - - -

    Inherited methods -
      -
    -
    - -
    -

    Method calc_statistic()

    -

    calculates the calculates the Cramer-von-Mises - statistic

    Usage

    -

    Rn1_CvM$calc_statistic(Rn1)

    - -

    Arguments

    -

    -
    Rn1

    see Rn1_statistic

    - -

    -

    Returns

    -

    see Rn1_statistic

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    Rn1_CvM$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/Rn1_KS.html b/docs/reference/Rn1_KS.html deleted file mode 100644 index 4feff36..0000000 --- a/docs/reference/Rn1_KS.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - -Kolmogorov-Smirnov-statistic for marked empirical - process — Rn1_KS • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Implements the "interface" Rn1_statistic

    -
    - - - -

    Super class

    - -

    bootGOF::Rn1_statistic -> Rn1_KS

    -

    Methods

    - - -

    Public methods

    - - -

    Inherited methods -
      -
    -
    - -
    -

    Method calc_statistic()

    -

    calculates the Kolmogorov-Smirnov-statistic

    Usage

    -

    Rn1_KS$calc_statistic(Rn1)

    - -

    Arguments

    -

    -
    Rn1

    see Rn1_statistic

    - -

    -

    Returns

    -

    see Rn1_statistic

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    Rn1_KS$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/Rn1_statistic.html b/docs/reference/Rn1_statistic.html deleted file mode 100644 index 2f5ee37..0000000 --- a/docs/reference/Rn1_statistic.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - -R6 Class representing statistics for marked - empirical processes — Rn1_statistic • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    R6 does not offer interfaces. Hence all methods - are considered as abstract.

    -
    - - - -

    Methods

    - - -

    Public methods

    - - -


    -

    Method calc_statistic()

    -

    Abstract function that calculates the statistic - for a given marked empirical process

    Usage

    -

    Rn1_statistic$calc_statistic(Rn1)

    - -

    Arguments

    -

    -
    Rn1

    marked empirical process as a double vector

    - -

    -

    Returns

    -

    statistic based on Rn1

    -


    -

    Method clone()

    -

    The objects of this class are cloneable with this method.

    Usage

    -

    Rn1_statistic$clone(deep = FALSE)

    - -

    Arguments

    -

    -
    deep

    Whether to make a deep clone.

    - -

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 70c5d68..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - - -Function reference • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    GOF-tests

    -

    -
    -

    GOF_model()

    -

    Convenience function for creating a GOF-test for statistical models

    -

    GOF_model_test

    -

    R6 Class representing the Goodness-of-Fit test - for (linear) models.

    -

    Statistics for the marked empiricial process

    -

    -
    -

    Rn1_statistic

    -

    R6 Class representing statistics for marked - empirical processes

    -

    Rn1_CvM

    -

    Cramer-von-Mises-statistic for marked empirical - process

    -

    Rn1_KS

    -

    Kolmogorov-Smirnov-statistic for marked empirical - process

    -

    Class that holds the bootstrap resampling schema

    -

    -
    -

    GOF_model_resample

    -

    R6 Class representing the resampling scheme for -Goodness-of-fit-tests for (linear) models

    -

    Classes for generating/resampling dependent variable

    -

    -
    -

    GOF_model_simulator

    -

    R6 Class representing a generator/resample of the dependent variable

    -

    GOF_glm_sim_param

    -

    Implements the "interface" GOF_model_simulator for - for generalized linear models

    -

    GOF_lm_sim_param

    -

    Implements the "interface" GOF_model_simulator for - for linear models

    -

    GOF_sim_wild_rademacher

    -

    Implements the "interface" GOF_model_simulator - in a semi-parametric fashion

    -

    Classes for refitting a model

    -

    -
    -

    GOF_model_trainer

    -

    R6 Class representing a trainer for fitting models

    -

    GOF_glm_trainer

    -

    Implements the "interface" GOF_model_trainer for - for generalized linear models

    -

    GOF_lm_trainer

    -

    Implements the "interface" GOF_model_trainer for - for linear models

    -

    Classes extracting information from a model

    -

    -
    -

    GOF_model_info_extractor

    -

    R6 Class representing model information

    -

    GOF_glm_info_extractor

    -

    Implements the "interface" GOF_model_info_extractor for - for generalized linear models

    -

    GOF_lm_info_extractor

    -

    Implements the "interface" GOF_model_info_extractor - for linear models

    -
    - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/not_covered.html b/docs/reference/not_covered.html deleted file mode 100644 index c39a481..0000000 --- a/docs/reference/not_covered.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - -example of a function that is not covered by unit-tests — not_covered • GOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    example of a function that is not covered by unit-tests

    -
    - -
    not_covered()
    - - -

    Value

    - -

    no explicit return value

    - -

    Examples

    -
    not_covered()
    #> NULL
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/rrademacher.html b/docs/reference/rrademacher.html deleted file mode 100644 index b015d17..0000000 --- a/docs/reference/rrademacher.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - -Generates Rademacher distributed random variables — rrademacher • bootGOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Generates Rademacher distributed random variables

    -
    - -
    rrademacher(n)
    - -

    Arguments

    - - - - - - -
    n

    number of random variables to be generated

    - -

    Value

    - -

    vector of values following the Rademacher distribution

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index 23b5876..0000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - http://MarselScheer.github.io/bootGOF/index.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_glm_info_extractor.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_glm_sim_param.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_glm_trainer.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_lm_info_extractor.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_lm_sim_param.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_lm_trainer.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_model.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_model_info_extractor.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_model_resample.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_model_simulator.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_model_test.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_model_trainer.html - - - http://MarselScheer.github.io/bootGOF/reference/GOF_sim_wild_rademacher.html - - - http://MarselScheer.github.io/bootGOF/reference/Rn1_CvM.html - - - http://MarselScheer.github.io/bootGOF/reference/Rn1_KS.html - - - http://MarselScheer.github.io/bootGOF/reference/Rn1_statistic.html - - - http://MarselScheer.github.io/bootGOF/reference/rrademacher.html - - - http://MarselScheer.github.io/bootGOF/articles/Architecture.html - - - http://MarselScheer.github.io/bootGOF/articles/New-Models.html - - diff --git a/inst/tinytest/test_GOF_model.R b/inst/tinytest/test_GOF_model.R index 3835b4a..2a007ce 100644 --- a/inst/tinytest/test_GOF_model.R +++ b/inst/tinytest/test_GOF_model.R @@ -1,7 +1,7 @@ dummy_lm_model <- function() { set.seed(1) - X <- rnorm(10) - Y <- 5 * X + rnorm(10) + X <- rnorm(10) # nolint + Y <- 5 * X + rnorm(10) # nolint d <- data.frame(y = Y, x = X) fit <- lm(y ~ x, data = d) ret <- list(fit = fit, X = X, Y = Y, d = d) @@ -10,33 +10,33 @@ dummy_lm_model <- function() { dummy_glm_model <- function() { set.seed(1) - X <- 1:10 - Y <- 1:10 + X <- 1:10 # nolint + Y <- 1:10 # nolint d <- data.frame(y = Y, x = X) fit <- glm(y ~ x, data = d, family = poisson()) ret <- list(fit = fit, X = X, Y = Y, d = d) return(ret) } -GOF_model_resample_dummy <- R6::R6Class( +GOF_model_resample_dummy <- R6::R6Class( # nolint classname = "dummy", public = list( initialize = function(gof_model_simulator, gof_model_trainer) { })) -GOF_model_test_dummy <- R6::R6Class( +GOF_model_test_dummy <- R6::R6Class( # nolint classname = "dummy", public = list( initialize = function(model, data, nmb_boot_samples, y_name, - Rn1_statistic, + Rn1_statistic, # nolint gof_model_info_extractor, gof_model_resample) { })) -GOF_model_error_if_fit_class_is_not_lm_or_glm <- function() { +GOF_model_error_if_fit_class_is_not_lm_or_glm <- function() { # nolint dummy <- dummy_glm_model() class(dummy$fit) <- "lmglm" expect_error( @@ -51,9 +51,9 @@ GOF_model_error_if_fit_class_is_not_lm_or_glm <- function() { } GOF_model_error_if_fit_class_is_not_lm_or_glm() -GOF_model_warns_if_MASS_glmnb_is_used <- function() { - X <- 1:10 - Y <- 1:10 +GOF_model_warns_if_MASS_glmnb_is_used <- function() { # nolint + X <- 1:10 # nolint + Y <- 1:10 # nolint d <- data.frame(y = Y, x = X) fit <- suppressWarnings(MASS::glm.nb(y ~ x, data = d)) expect_warning( @@ -63,23 +63,28 @@ GOF_model_warns_if_MASS_glmnb_is_used <- function() { data = d, y_name = "Y", simulator_type = "parametric", - Rn1_statistic = Rn1_CvM$new()), - pattern = "The GOF-test requires to refit the model. Refitting MASS::glm.nb can be problematic, see vignette New-Models") + Rn1_statistic = Rn1_CvM$new() + ), + pattern = paste( + "The GOF-test requires to refit the model.", + "Refitting MASS::glm.nb can be problematic, see vignette New-Models" + ) + ) } GOF_model_warns_if_MASS_glmnb_is_used() -GOF_model_uses_lm_info_extractor <- function() { +GOF_model_uses_lm_info_extractor <- function() { # nolint dummy_lm <- dummy_lm_model() inject_lm_info_extractor <- FALSE - GOF_model_test_spy <- R6::R6Class( + GOF_model_test_spy <- R6::R6Class( # nolint classname = "GOF_model_test", public = list( initialize = function(model, data, nmb_boot_samples, y_name, - Rn1_statistic, + Rn1_statistic, # nolint gof_model_info_extractor, gof_model_resample) { inject_lm_info_extractor <<- inherits( @@ -96,11 +101,11 @@ GOF_model_uses_lm_info_extractor <- function() { } GOF_model_uses_lm_info_extractor() -GOF_model_uses_lm_trainer <- function() { +GOF_model_uses_lm_trainer <- function() { # nolint dummy_lm <- dummy_lm_model() inject_lm_trainer <- FALSE - GOF_model_resample_spy <- R6::R6Class( + GOF_model_resample_spy <- R6::R6Class( # nolint classname = "GOF_model_resample", public = list( initialize = function(gof_model_simulator, gof_model_trainer) { @@ -118,11 +123,11 @@ GOF_model_uses_lm_trainer <- function() { } GOF_model_uses_lm_trainer() -GOF_model_uses_lm_parametric_simulator <- function() { +GOF_model_uses_lm_parametric_simulator <- function() { # nolint dummy_lm <- dummy_lm_model() inject_lm_param_simulator <- FALSE - GOF_model_resample_spy <- R6::R6Class( + GOF_model_resample_spy <- R6::R6Class( # nolint classname = "GOF_model_resample", public = list( initialize = function(gof_model_simulator, gof_model_trainer) { @@ -140,11 +145,11 @@ GOF_model_uses_lm_parametric_simulator <- function() { } GOF_model_uses_lm_parametric_simulator() -GOF_model_uses_lm_rademacher_simulator <- function() { +GOF_model_uses_lm_rademacher_simulator <- function() { # nolint dummy_lm <- dummy_lm_model() inject_lm_rademacher_simulator <- FALSE - GOF_model_resample_spy <- R6::R6Class( + GOF_model_resample_spy <- R6::R6Class( # nolint classname = "GOF_model_resample", public = list( initialize = function(gof_model_simulator, gof_model_trainer) { @@ -162,18 +167,18 @@ GOF_model_uses_lm_rademacher_simulator <- function() { } GOF_model_uses_lm_rademacher_simulator() -GOF_model_uses_unknow_simulator_type <- function() { +GOF_model_uses_unknow_simulator_type <- function() { # nolint expect_error( GOF_model(simulator_type = "sthelse"), pattern = "simulator_type.*failed") } GOF_model_uses_unknow_simulator_type() -GOF_model_uses_glm_parametric_simulator <- function() { +GOF_model_uses_glm_parametric_simulator <- function() { # nolint dummy_glm <- dummy_glm_model() inject_glm_param_simulator <- FALSE - GOF_model_resample_spy <- R6::R6Class( + GOF_model_resample_spy <- R6::R6Class( # nolint classname = "GOF_model_resample", public = list( initialize = function(gof_model_simulator, gof_model_trainer) { @@ -191,18 +196,18 @@ GOF_model_uses_glm_parametric_simulator <- function() { } GOF_model_uses_glm_parametric_simulator() -GOF_model_uses_glm_info_extractor <- function() { +GOF_model_uses_glm_info_extractor <- function() { # nolint dummy_glm <- dummy_glm_model() inject_glm_info_extractor <- FALSE - GOF_model_test_spy <- R6::R6Class( + GOF_model_test_spy <- R6::R6Class( # nolint classname = "GOF_model_test", public = list( initialize = function(model, data, nmb_boot_samples, y_name, - Rn1_statistic, + Rn1_statistic, # nolint gof_model_info_extractor, gof_model_resample) { inject_glm_info_extractor <<- inherits( @@ -219,11 +224,11 @@ GOF_model_uses_glm_info_extractor <- function() { } GOF_model_uses_glm_info_extractor() -GOF_model_uses_glm_trainer <- function() { +GOF_model_uses_glm_trainer <- function() { # nolint dummy_glm <- dummy_glm_model() inject_glm_trainer <- FALSE - GOF_model_resample_spy <- R6::R6Class( + GOF_model_resample_spy <- R6::R6Class( # nolint classname = "GOF_model_resample", public = list( initialize = function(gof_model_simulator, gof_model_trainer) { @@ -242,10 +247,10 @@ GOF_model_uses_glm_trainer <- function() { GOF_model_uses_glm_trainer() -GOF_model_expect_small_pvalue <- function() { +GOF_model_expect_small_pvalue <- function() { # nolint set.seed(1) - X1 <- rnorm(100) - X2 <- rnorm(100) + X1 <- rnorm(100) # nolint + X2 <- rnorm(100) # nolint d <- data.frame( y = rpois(n = 100, lambda = exp(4 + X1 * 2 + X2 * 6)), x1 = X1) @@ -260,7 +265,7 @@ GOF_model_expect_small_pvalue <- function() { expect_equal(mt$get_pvalue(), 0) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rnorm(n = 100, mean = 4 + X1^2), x1 = X1) @@ -277,9 +282,9 @@ GOF_model_expect_small_pvalue <- function() { } GOF_model_expect_small_pvalue() -GOF_model_expect_non_small_pvalue <- function() { +GOF_model_expect_non_small_pvalue <- function() { # nolint set.seed(1) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rpois(n = 100, lambda = exp(4 + X1 * 2)), x1 = X1) @@ -294,7 +299,7 @@ GOF_model_expect_non_small_pvalue <- function() { expect_equal(mt$get_pvalue(), 0.74) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rnorm(n = 100, mean = 4 + X1 + X1^2), x1 = X1) @@ -311,9 +316,9 @@ GOF_model_expect_non_small_pvalue <- function() { } GOF_model_expect_non_small_pvalue() -GOF_model_error_for_glm_semi_parametric <- function() { +GOF_model_error_for_glm_semi_parametric <- function() { # nolint set.seed(1) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rpois(n = 100, lambda = exp(4 + X1 * 2)), x1 = X1) @@ -326,7 +331,9 @@ GOF_model_error_for_glm_semi_parametric <- function() { simulator_type = "semi_parametric_rademacher", y_name = "y", Rn1_statistic = Rn1_KS$new()), - pattern = "Ordinary Least Square estimate necessary for semi_parameteric_rademacher" + pattern = paste( + "Ordinary Least Square estimate necessary for semi_parameteric_rademacher" + ) ) } GOF_model_error_for_glm_semi_parametric() diff --git a/inst/tinytest/test_GOF_model_info_extractor.R b/inst/tinytest/test_GOF_model_info_extractor.R index 4fa3249..f2f7cdf 100644 --- a/inst/tinytest/test_GOF_model_info_extractor.R +++ b/inst/tinytest/test_GOF_model_info_extractor.R @@ -1,4 +1,4 @@ -GOF_model_info_extractor_all_methods_are_abstract <- function() { +GOF_model_info_extractor_all_methods_are_abstract <- function() { # nolint mif <- GOF_model_info_extractor$new() expect_error( mif$yhat(model = list()), @@ -13,8 +13,8 @@ GOF_model_info_extractor_all_methods_are_abstract <- function() { } GOF_model_info_extractor_all_methods_are_abstract() -GOF_lm_info_extractor_one_covariate <- function() { - fit <- lm(y~x, data = data.frame(y = 2*(1:10), x = 1:10)) +GOF_lm_info_extractor_one_covariate <- function() { # nolint + fit <- lm(y~x, data = data.frame(y = 2 * (1:10), x = 1:10)) mif <- GOF_lm_info_extractor$new() expect_equivalent( mif$yhat(model = fit), @@ -29,9 +29,9 @@ GOF_lm_info_extractor_one_covariate <- function() { GOF_lm_info_extractor_one_covariate() -GOF_glm_info_extractor_one_covariate <- function() { - Y <- 2 * (1:10) - X = 1:10 +GOF_glm_info_extractor_one_covariate <- function() { # nolint + Y <- 2 * (1:10) # nolint + X <- 1:10 # nolint fit <- glm(y~x, data = data.frame(y = Y, x = X), family = poisson()) beta <- coef(fit) b_times_x <- beta["(Intercept)"] + beta["x"] * X diff --git a/inst/tinytest/test_GOF_model_resample.R b/inst/tinytest/test_GOF_model_resample.R index 855bb35..51f35e3 100644 --- a/inst/tinytest/test_GOF_model_resample.R +++ b/inst/tinytest/test_GOF_model_resample.R @@ -1,4 +1,4 @@ -GOF_model_resample_works <- function() { +GOF_model_resample_works <- function() { # nolint d <- data.frame(y = 101:110, x = 1:10) ms_mock <- R6::R6Class( inherit = GOF_model_simulator, @@ -7,7 +7,10 @@ GOF_model_resample_works <- function() { 1:10 }))$new() mt <- GOF_lm_trainer$new() - mr <- GOF_model_resample$new(gof_model_simulator = ms_mock, gof_model_trainer = mt) + mr <- GOF_model_resample$new( + gof_model_simulator = ms_mock, + gof_model_trainer = mt + ) fit <- lm(y~x, data = d) fit_new <- mr$resample(model = fit, data = d, y_name = "y") expect_equivalent( diff --git a/inst/tinytest/test_GOF_model_simulator.R b/inst/tinytest/test_GOF_model_simulator.R index ade7d07..2fa26e8 100644 --- a/inst/tinytest/test_GOF_model_simulator.R +++ b/inst/tinytest/test_GOF_model_simulator.R @@ -1,4 +1,4 @@ -GOF_model_simulator_all_methods_abstract <- function() { +GOF_model_simulator_all_methods_abstract <- function() { # nolint ms <- GOF_model_simulator$new() expect_error( ms$resample_y(), @@ -6,11 +6,11 @@ GOF_model_simulator_all_methods_abstract <- function() { } GOF_model_simulator_all_methods_abstract() -GOF_lm_sim_param_simulates <- function() { +GOF_lm_sim_param_simulates <- function() { # nolint set.seed(1) ms <- GOF_lm_sim_param$new() - X <- 1:1000 - Y <- X + rnorm(1000, sd = 0.1) + X <- 1:1000 # nolint + Y <- X + rnorm(1000, sd = 0.1) # nolint d <- data.frame(y = Y, x = X) fit <- lm(y~x, data = d) expect_true( @@ -22,7 +22,7 @@ GOF_lm_sim_param_simulates <- function() { } GOF_lm_sim_param_simulates() -GOF_sim_wild_rademacher_simulates <- function() { +GOF_sim_wild_rademacher_simulates <- function() { # nolint info_mock <- R6::R6Class( classname = "info_mock", inherit = GOF_model_info_extractor, @@ -35,7 +35,7 @@ GOF_sim_wild_rademacher_simulates <- function() { } ) ) - info_mock = info_mock$new() + info_mock <- info_mock$new() ms <- GOF_sim_wild_rademacher$new(gof_model_info_extractor = info_mock) mockery::stub( where = ms$resample_y, @@ -54,12 +54,12 @@ GOF_sim_wild_rademacher_simulates <- function() { } GOF_sim_wild_rademacher_simulates() -GOF_lm_sim_param_wild_rademacher_simulates <- function() { +GOF_lm_sim_param_wild_rademacher_simulates <- function() { # nolint set.seed(1) ie <- GOF_lm_info_extractor$new() ms <- GOF_sim_wild_rademacher$new(gof_model_info_extractor = ie) - X <- 1:10 - Y <- X + rnorm(10) + X <- 1:10 # nolint + Y <- X + rnorm(10) # nolint d <- data.frame(y = Y, x = X) fit <- lm(y~x, data = d) mockery::stub( @@ -83,11 +83,11 @@ GOF_lm_sim_param_wild_rademacher_simulates <- function() { } GOF_lm_sim_param_wild_rademacher_simulates() -GOF_glm_sim_param_simulates <- function() { +GOF_glm_sim_param_simulates <- function() { # nolint set.seed(1) - N <- 100 - X1 <- rnorm(N) - X2 <- rnorm(N) + N <- 100 # nolint + X1 <- rnorm(N) # nolint + X2 <- rnorm(N) # nolint d <- data.frame( sth = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)), x1 = X1, x2 = X2) @@ -101,4 +101,3 @@ GOF_glm_sim_param_simulates <- function() { ) } GOF_glm_sim_param_simulates() - diff --git a/inst/tinytest/test_GOF_model_test.R b/inst/tinytest/test_GOF_model_test.R index e846360..ea815b2 100644 --- a/inst/tinytest/test_GOF_model_test.R +++ b/inst/tinytest/test_GOF_model_test.R @@ -1,7 +1,7 @@ -Rn1_fun <- function(r, o) { +Rn1_fun <- function(r, o) { # nolint cumsum(r[o]) } -GOF_model_test_necessary_input <- function() { +GOF_model_test_necessary_input <- function() { # nolint expect_error( GOF_model_test$new(), pattern = "nmb_boot_samples") @@ -50,10 +50,10 @@ GOF_model_test_necessary_input <- function() { } GOF_model_test_necessary_input() -GOF_model_test_calc_Rn1_org <- function() { +GOF_model_test_calc_Rn1_org <- function() { # nolint set.seed(1) - X <- rnorm(10) - Y <- 5 * X + rnorm(10) + X <- rnorm(10) # nolint + Y <- 5 * X + rnorm(10) # nolint d <- data.frame(y = Y, x = X) fit <- lm(y ~ x, data = d) mt <- GOF_model_test$new( @@ -71,20 +71,20 @@ GOF_model_test_calc_Rn1_org <- function() { } GOF_model_test_calc_Rn1_org() -GOF_model_test_calc_Rn1_boot <- function() { +GOF_model_test_calc_Rn1_boot <- function() { # nolint set.seed(1) - X <- rnorm(10) - Y <- 5 * X + rnorm(10) + X <- rnorm(10) # nolint + Y <- 5 * X + rnorm(10) # nolint d <- data.frame(y = Y, x = X) fit <- lm(y ~ x, data = d) model_resample_mock <- list(rnorm(10), rnorm(10), rnorm(10)) - MODEL_MOCK_NMB <- 0 + MODEL_MOCK_NMB <- 0 # nolint lm_sim_para_mock <- R6::R6Class( public = list( resample_y = function(model) { - MODEL_MOCK_NMB <<- MODEL_MOCK_NMB + 1 + MODEL_MOCK_NMB <<- MODEL_MOCK_NMB + 1 # nolint model_resample_mock[[MODEL_MOCK_NMB]] }))$new() @@ -121,13 +121,13 @@ GOF_model_test_calc_Rn1_boot <- function() { } GOF_model_test_calc_Rn1_boot() -GOF_model_test_calc_pvalue <- function() { +GOF_model_test_calc_pvalue <- function() { # nolint set.seed(1) - X <- rnorm(10) - Y <- 5 * X + rnorm(10) + X <- rnorm(10) # nolint + Y <- 5 * X + rnorm(10) # nolint d <- data.frame(y = Y, x = X) fit <- lm(y ~ x, data = d) - KS <- Rn1_KS$new() + KS <- Rn1_KS$new() # nolint mt <- GOF_model_test$new( model = fit, data = d, @@ -140,8 +140,7 @@ GOF_model_test_calc_pvalue <- function() { gof_model_trainer = GOF_lm_trainer$new())) out <- mt$get_pvalue() expect_equal( - out, - { + out, { stat_org <- KS$calc_statistic(mt$get_Rn1_org()) stat_boot <- sapply(mt$get_Rn1_boot(), KS$calc_statistic) mean(stat_org < stat_boot) @@ -152,10 +151,10 @@ GOF_model_test_calc_pvalue() -GOF_model_test_expect_small_pvalue <- function() { +GOF_model_test_expect_small_pvalue <- function() { # nolint set.seed(1) - X1 <- rnorm(100) - X2 <- rnorm(100) + X1 <- rnorm(100) # nolint + X2 <- rnorm(100) # nolint d <- data.frame( y = rpois(n = 100, lambda = exp(4 + X1 * 2 + X2 * 6)), x1 = X1) @@ -173,7 +172,7 @@ GOF_model_test_expect_small_pvalue <- function() { expect_equal(mt$get_pvalue(), 0) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rnorm(n = 100, mean = 4 + X1^2), x1 = X1) @@ -196,9 +195,9 @@ GOF_model_test_expect_small_pvalue <- function() { } GOF_model_test_expect_small_pvalue() -GOF_model_test_expect_non_small_pvalue <- function() { +GOF_model_test_expect_non_small_pvalue <- function() { # nolint set.seed(1) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rpois(n = 100, lambda = exp(4 + X1 * 2)), x1 = X1) @@ -216,7 +215,7 @@ GOF_model_test_expect_non_small_pvalue <- function() { expect_equal(mt$get_pvalue(), 0.74) - X1 <- rnorm(100) + X1 <- rnorm(100) # nolint d <- data.frame( y = rnorm(n = 100, mean = 4 + X1 + X1^2), x1 = X1) diff --git a/inst/tinytest/test_GOF_model_trainer.R b/inst/tinytest/test_GOF_model_trainer.R index 9dc8baf..24ef69c 100644 --- a/inst/tinytest/test_GOF_model_trainer.R +++ b/inst/tinytest/test_GOF_model_trainer.R @@ -1,4 +1,4 @@ -GOF_model_trainer_all_methods_abstract <- function() { +GOF_model_trainer_all_methods_abstract <- function() { # nolint mt <- GOF_model_trainer$new() expect_error( mt$refit(), @@ -6,12 +6,12 @@ GOF_model_trainer_all_methods_abstract <- function() { } GOF_model_trainer_all_methods_abstract() -GOF_lm_trainer_refits_model <- function() { +GOF_lm_trainer_refits_model <- function() { # nolint mt <- GOF_lm_trainer$new() d <- data.frame(Y = 1:10, X = 1:10) fit <- lm(Y~X, data = d) d_new <- d - d_new$Y <- -(1:10) + d_new$Y <- -(1:10) # nolint fit_new <- mt$refit(model = fit, data = d_new) expect_equivalent( coef(fit_new), @@ -19,12 +19,12 @@ GOF_lm_trainer_refits_model <- function() { } GOF_lm_trainer_refits_model() -GOF_glm_trainer_refits_model <- function() { +GOF_glm_trainer_refits_model <- function() { # nolint mt <- GOF_glm_trainer$new() d <- data.frame(Y = 1:10, X = 1:10) fit <- glm(Y~X, data = d, family = Gamma()) d_new <- d - d_new$Y <- (101:110) + d_new$Y <- (101:110) # nolint fit_new <- mt$refit(model = fit, data = d_new) expect_equivalent( coef(fit_new), diff --git a/inst/tinytest/test_Rn1_statistic.R b/inst/tinytest/test_Rn1_statistic.R index f3d59c9..0abefde 100644 --- a/inst/tinytest/test_Rn1_statistic.R +++ b/inst/tinytest/test_Rn1_statistic.R @@ -1,4 +1,4 @@ -Rn1_statistic_all_methods_are_abstract <- function() { +Rn1_statistic_all_methods_are_abstract <- function() { # nolint stat <- Rn1_statistic$new() expect_error( stat$calc_statistic(Rn1 = 1:100), @@ -7,7 +7,7 @@ Rn1_statistic_all_methods_are_abstract <- function() { } Rn1_statistic_all_methods_are_abstract() -Rn1_KS_calculates_Kolomogorov_Smirnoff <- function() { +Rn1_KS_calculates_Kolomogorov_Smirnoff <- function() { # nolint stat <- Rn1_KS$new() r <- runif(10) expect_equal( @@ -16,7 +16,7 @@ Rn1_KS_calculates_Kolomogorov_Smirnoff <- function() { } Rn1_KS_calculates_Kolomogorov_Smirnoff() -Rn1_CvM_calculates_Cramer_von_Mises <- function() { +Rn1_CvM_calculates_Cramer_von_Mises <- function() { # nolint stat <- Rn1_CvM$new() r <- runif(10) expect_equal( diff --git a/man/GOF_glm_info_extractor.Rd b/man/GOF_glm_info_extractor.Rd deleted file mode 100644 index 6583b84..0000000 --- a/man/GOF_glm_info_extractor.Rd +++ /dev/null @@ -1,106 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_info_extractor.R -\name{GOF_glm_info_extractor} -\alias{GOF_glm_info_extractor} -\title{Implements the "interface" GOF_model_info_extractor for - for generalized linear models} -\description{ -This class is specialized in extracting various information - from an object of class "glm" -} -\section{Super class}{ -\code{\link[bootGOF:GOF_model_info_extractor]{bootGOF::GOF_model_info_extractor}} -> \code{GOF_glm_info_extractor} -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-yhat}{\code{GOF_glm_info_extractor$yhat()}} -\item \href{#method-y_minus_yhat}{\code{GOF_glm_info_extractor$y_minus_yhat()}} -\item \href{#method-beta_x_covariates}{\code{GOF_glm_info_extractor$beta_x_covariates()}} -\item \href{#method-clone}{\code{GOF_glm_info_extractor$clone()}} -} -} -\if{html}{ -\out{
    Inherited methods} -\itemize{ -} -\out{
    } -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-yhat}{}}} -\subsection{Method \code{yhat()}}{ -see \link{GOF_model_info_extractor} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_info_extractor$yhat(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_info_extractor}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_info_extractor} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-y_minus_yhat}{}}} -\subsection{Method \code{y_minus_yhat()}}{ -see \link{GOF_model_info_extractor} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_info_extractor$y_minus_yhat(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_info_extractor}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_info_extractor} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-beta_x_covariates}{}}} -\subsection{Method \code{beta_x_covariates()}}{ -see \link{GOF_model_info_extractor} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_info_extractor$beta_x_covariates(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_info_extractor}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_info_extractor} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_info_extractor$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_glm_sim_param.Rd b/man/GOF_glm_sim_param.Rd deleted file mode 100644 index 23e4425..0000000 --- a/man/GOF_glm_sim_param.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_simulator.R -\name{GOF_glm_sim_param} -\alias{GOF_glm_sim_param} -\title{Implements the "interface" GOF_model_simulator for - for generalized linear models} -\description{ -after the GLM was fitted the distribution of the - of the dependent variable is fully specified and used here - to generate new depenedent variables that follow \code{model} -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-resample_y}{\code{GOF_glm_sim_param$resample_y()}} -\item \href{#method-clone}{\code{GOF_glm_sim_param$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-resample_y}{}}} -\subsection{Method \code{resample_y()}}{ -see \link{GOF_model_simulator} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_sim_param$resample_y(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_simulator}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_simulator} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_sim_param$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_glm_trainer.Rd b/man/GOF_glm_trainer.Rd deleted file mode 100644 index 57e1a19..0000000 --- a/man/GOF_glm_trainer.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_trainer.R -\name{GOF_glm_trainer} -\alias{GOF_glm_trainer} -\title{Implements the "interface" GOF_model_trainer for - for generalized linear models} -\description{ -refits an object of class "glm" to a new data set -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-refit}{\code{GOF_glm_trainer$refit()}} -\item \href{#method-clone}{\code{GOF_glm_trainer$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-refit}{}}} -\subsection{Method \code{refit()}}{ -see \link{GOF_model_trainer} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_trainer$refit(model, data)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_trainer}} - -\item{\code{data}}{see \link{GOF_model_trainer}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_trainer} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_glm_trainer$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_lm_info_extractor.Rd b/man/GOF_lm_info_extractor.Rd deleted file mode 100644 index de0008e..0000000 --- a/man/GOF_lm_info_extractor.Rd +++ /dev/null @@ -1,106 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_info_extractor.R -\name{GOF_lm_info_extractor} -\alias{GOF_lm_info_extractor} -\title{Implements the "interface" GOF_model_info_extractor - for linear models} -\description{ -This class is specialized in extracting various information - from an object of class "lm" -} -\section{Super class}{ -\code{\link[bootGOF:GOF_model_info_extractor]{bootGOF::GOF_model_info_extractor}} -> \code{GOF_lm_info_extractor} -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-yhat}{\code{GOF_lm_info_extractor$yhat()}} -\item \href{#method-y_minus_yhat}{\code{GOF_lm_info_extractor$y_minus_yhat()}} -\item \href{#method-beta_x_covariates}{\code{GOF_lm_info_extractor$beta_x_covariates()}} -\item \href{#method-clone}{\code{GOF_lm_info_extractor$clone()}} -} -} -\if{html}{ -\out{
    Inherited methods} -\itemize{ -} -\out{
    } -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-yhat}{}}} -\subsection{Method \code{yhat()}}{ -see \link{GOF_model_info_extractor} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_info_extractor$yhat(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_info_extractor}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_info_extractor} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-y_minus_yhat}{}}} -\subsection{Method \code{y_minus_yhat()}}{ -see \link{GOF_model_info_extractor} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_info_extractor$y_minus_yhat(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_info_extractor}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_info_extractor} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-beta_x_covariates}{}}} -\subsection{Method \code{beta_x_covariates()}}{ -see \link{GOF_model_info_extractor} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_info_extractor$beta_x_covariates(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_info_extractor}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_info_extractor} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_info_extractor$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_lm_sim_param.Rd b/man/GOF_lm_sim_param.Rd deleted file mode 100644 index 61a824b..0000000 --- a/man/GOF_lm_sim_param.Rd +++ /dev/null @@ -1,58 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_simulator.R -\name{GOF_lm_sim_param} -\alias{GOF_lm_sim_param} -\title{Implements the "interface" GOF_model_simulator for - for linear models} -\description{ -after the classical linear model was fitted the - normal distribution of the - of the dependent variable is fully specified and used here - to generate new depenedent variables that follow \code{model} -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-resample_y}{\code{GOF_lm_sim_param$resample_y()}} -\item \href{#method-clone}{\code{GOF_lm_sim_param$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-resample_y}{}}} -\subsection{Method \code{resample_y()}}{ -generates/resamples the dependent variables based - on the parameteric nature defined by \code{model} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_sim_param$resample_y(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_simulator}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_simulator} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_sim_param$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_lm_trainer.Rd b/man/GOF_lm_trainer.Rd deleted file mode 100644 index c8b6c50..0000000 --- a/man/GOF_lm_trainer.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_trainer.R -\name{GOF_lm_trainer} -\alias{GOF_lm_trainer} -\title{Implements the "interface" GOF_model_trainer for - for linear models} -\description{ -refits an object of class "lm" to a new data set -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-refit}{\code{GOF_lm_trainer$refit()}} -\item \href{#method-clone}{\code{GOF_lm_trainer$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-refit}{}}} -\subsection{Method \code{refit()}}{ -see \link{GOF_model_trainer} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_trainer$refit(model, data)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_trainer}} - -\item{\code{data}}{see \link{GOF_model_trainer}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_trainer} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_lm_trainer$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_model.Rd b/man/GOF_model.Rd deleted file mode 100644 index 0bbbaf3..0000000 --- a/man/GOF_model.Rd +++ /dev/null @@ -1,77 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model.R -\name{GOF_model} -\alias{GOF_model} -\title{Convenience function for creating a GOF-test for statistical models} -\usage{ -GOF_model( - model, - data, - nmb_boot_samples, - simulator_type, - y_name, - Rn1_statistic, - gof_model_resample_class = GOF_model_resample, - gof_model_test_class = GOF_model_test -) -} -\arguments{ -\item{model}{of class 'lm' or 'glm'. Caution with MASS::glm.nb, see -vignette 'New-Models' for more details.} - -\item{data}{see \link{GOF_model_test}} - -\item{nmb_boot_samples}{see \link{GOF_model_test}} - -\item{simulator_type}{either "parameteric" or "semi_parameteric_rademacher"} - -\item{y_name}{see \link{GOF_model_test}} - -\item{Rn1_statistic}{see \link{GOF_model_test}} - -\item{gof_model_resample_class}{no need to change this parameter. Here the -class used for resampling the model (\link{GOF_model_resample}) -is injected. This parameter simply makes it easier to test the -convenience function properly.} - -\item{gof_model_test_class}{no need to change this parameter. Here the -class used for performing the GOF test (\link{GOF_model_test}) -is injected. This parameter simply makes it easier to test the -convenience function properly.} -} -\value{ -instance of \link{GOF_model_test} -} -\description{ -Simplifies the creation of an instance of - \link{GOF_model_test}, the actual work horse for performing a - goodness-of-fit-test. -} -\examples{ -set.seed(1) -N <- 100 -X1 <- rnorm(N) -X2 <- rnorm(N) -d <- data.frame( - y = rpois(n = N, lambda = exp(4 + X1 * 2 + X2 * 6)), - x1 = X1, - x2 = X2) -fit <- glm(y ~ x1, data = d, family = poisson()) -mt <- GOF_model( - model = fit, - data = d, - nmb_boot_samples = 100, - simulator_type = "parametric", - y_name = "y", - Rn1_statistic = Rn1_KS$new()) -mt$get_pvalue() -fit <- glm(y ~ x1 + x2, data = d, family = poisson()) -mt <- GOF_model( - model = fit, - data = d, - nmb_boot_samples = 100, - simulator_type = "parametric", - y_name = "y", - Rn1_statistic = Rn1_KS$new()) -mt$get_pvalue() -} diff --git a/man/GOF_model_info_extractor.Rd b/man/GOF_model_info_extractor.Rd deleted file mode 100644 index d6cb296..0000000 --- a/man/GOF_model_info_extractor.Rd +++ /dev/null @@ -1,101 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_info_extractor.R -\name{GOF_model_info_extractor} -\alias{GOF_model_info_extractor} -\title{R6 Class representing model information} -\description{ -R6 does not offer interfaces. Hence all methods -are considered as abstract. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-yhat}{\code{GOF_model_info_extractor$yhat()}} -\item \href{#method-y_minus_yhat}{\code{GOF_model_info_extractor$y_minus_yhat()}} -\item \href{#method-beta_x_covariates}{\code{GOF_model_info_extractor$beta_x_covariates()}} -\item \href{#method-clone}{\code{GOF_model_info_extractor$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-yhat}{}}} -\subsection{Method \code{yhat()}}{ -Abstract function that estimates/predicts the - the dependent variable in \code{model} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_info_extractor$yhat(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{fitted model} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -estimate/prediction of the dependent variable - fitted by \code{model} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-y_minus_yhat}{}}} -\subsection{Method \code{y_minus_yhat()}}{ -abstract function that calculates the residuals - on the scale of the dependent variable. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_info_extractor$y_minus_yhat(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{fitted model} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -residuals on the scale of the dependent variable -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-beta_x_covariates}{}}} -\subsection{Method \code{beta_x_covariates()}}{ -abstract function that calculates the inner product - of estimated parameters and the independent variables. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_info_extractor$beta_x_covariates(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{fitted model} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -inner product of the estimated parameters and the - independent variables. -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_info_extractor$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_model_resample.Rd b/man/GOF_model_resample.Rd deleted file mode 100644 index 09141c0..0000000 --- a/man/GOF_model_resample.Rd +++ /dev/null @@ -1,82 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_resample.R -\name{GOF_model_resample} -\alias{GOF_model_resample} -\title{R6 Class representing the resampling scheme for -Goodness-of-fit-tests for (linear) models} -\description{ -Class is able to resample model fit, i.e. generate a - new data set and refit the model to the new data. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-new}{\code{GOF_model_resample$new()}} -\item \href{#method-resample}{\code{GOF_model_resample$resample()}} -\item \href{#method-clone}{\code{GOF_model_resample$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_resample$new(gof_model_simulator, gof_model_trainer)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{gof_model_simulator}}{an instance that implements \link{GOF_model_simulator}} - -\item{\code{gof_model_trainer}}{an instance that implements \link{GOF_model_trainer}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -No explicit return -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-resample}{}}} -\subsection{Method \code{resample()}}{ -resamples the dependent variable in \code{data} and refits - \code{model} to that new data set -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_resample$resample(model, data, y_name)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{fitted model based on \code{data}} - -\item{\code{data}}{used to fit \code{model}} - -\item{\code{y_name}}{string specifying the name of the dependent variable} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -a resampled version of \code{model} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_resample$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_model_simulator.Rd b/man/GOF_model_simulator.Rd deleted file mode 100644 index 28eff07..0000000 --- a/man/GOF_model_simulator.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_simulator.R -\name{GOF_model_simulator} -\alias{GOF_model_simulator} -\title{R6 Class representing a generator/resample of the dependent variable} -\description{ -R6 does not offer interfaces. Hence all methods - are considered as abstract. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-resample_y}{\code{GOF_model_simulator$resample_y()}} -\item \href{#method-clone}{\code{GOF_model_simulator$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-resample_y}{}}} -\subsection{Method \code{resample_y()}}{ -Abstract function that resamples/generates - the dependent variable -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_simulator$resample_y(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{fitted model} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -generates the dependent variable according to - the \code{model} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_simulator$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_model_test.Rd b/man/GOF_model_test.Rd deleted file mode 100644 index 20c7baf..0000000 --- a/man/GOF_model_test.Rd +++ /dev/null @@ -1,130 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_test.R -\name{GOF_model_test} -\alias{GOF_model_test} -\title{R6 Class representing the Goodness-of-Fit test - for (linear) models.} -\description{ -This class can test the null hypothesis that data follows - a particular linear model, i.e. classical linear models, generalized - linear models or models of the type \eqn{m(\beta^\top X) + \epsilon}. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-new}{\code{GOF_model_test$new()}} -\item \href{#method-get_Rn1_org}{\code{GOF_model_test$get_Rn1_org()}} -\item \href{#method-get_Rn1_boot}{\code{GOF_model_test$get_Rn1_boot()}} -\item \href{#method-get_pvalue}{\code{GOF_model_test$get_pvalue()}} -\item \href{#method-clone}{\code{GOF_model_test$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_test$new( - model, - data, - nmb_boot_samples, - y_name, - Rn1_statistic, - gof_model_info_extractor, - gof_model_resample -)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{a fitted model} - -\item{\code{data}}{used to fit \code{model}} - -\item{\code{nmb_boot_samples}}{integer specifying the number of bootstrap -samples to perform} - -\item{\code{y_name}}{string specifying the name of the dependent variable in -in \code{data}} - -\item{\code{Rn1_statistic}}{statistic used to map the marked empirical -process to the real line. Needs to be an instance of the class -that implements \link{Rn1_statistic}} - -\item{\code{gof_model_info_extractor}}{an instance that implements -\link{GOF_model_info_extractor} in order to apply it to -\code{model}} - -\item{\code{gof_model_resample}}{an instance that implements -\link{GOF_model_resample} in order to apply it to -\code{model}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -An instance of the Class -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-get_Rn1_org}{}}} -\subsection{Method \code{get_Rn1_org()}}{ -calculates the marked empricial process for \code{model} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_test$get_Rn1_org()}\if{html}{\out{
    }} -} - -\subsection{Returns}{ -vector ordered by the inner product of the estimated - parameter and the independent variables -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-get_Rn1_boot}{}}} -\subsection{Method \code{get_Rn1_boot()}}{ -calculates the marked empricial process for the - resampled versions of \code{model} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_test$get_Rn1_boot()}\if{html}{\out{
    }} -} - -\subsection{Returns}{ -list of length \code{nmb_boot_samples} where every element - is a vector ordered by the inner product of the estimated - parameter and the dependent variables -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-get_pvalue}{}}} -\subsection{Method \code{get_pvalue()}}{ -p-value for Goodness-of-Fit-test for \code{model} -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_test$get_pvalue()}\if{html}{\out{
    }} -} - -\subsection{Returns}{ -p-value for the null hypothesis that the dependent variable - was generated according to \code{model} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_test$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_model_trainer.Rd b/man/GOF_model_trainer.Rd deleted file mode 100644 index e05898e..0000000 --- a/man/GOF_model_trainer.Rd +++ /dev/null @@ -1,57 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_trainer.R -\name{GOF_model_trainer} -\alias{GOF_model_trainer} -\title{R6 Class representing a trainer for fitting models} -\description{ -R6 does not offer interfaces. Hence all methods -are considered as abstract. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-refit}{\code{GOF_model_trainer$refit()}} -\item \href{#method-clone}{\code{GOF_model_trainer$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-refit}{}}} -\subsection{Method \code{refit()}}{ -Abstract function refits the model to - a new data set -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_trainer$refit(model, data)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{fitted model} - -\item{\code{data}}{used for refitting the model} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -\code{model} refitted on \code{data} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_model_trainer$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/GOF_sim_wild_rademacher.Rd b/man/GOF_sim_wild_rademacher.Rd deleted file mode 100644 index 17cbdcf..0000000 --- a/man/GOF_sim_wild_rademacher.Rd +++ /dev/null @@ -1,75 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_simulator.R -\name{GOF_sim_wild_rademacher} -\alias{GOF_sim_wild_rademacher} -\title{Implements the "interface" GOF_model_simulator - in a semi-parametric fashion} -\description{ -This is a model agnostic resampling class, where -Rademacher random variables are used to add or substract -the residuals from the fitted values. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-new}{\code{GOF_sim_wild_rademacher$new()}} -\item \href{#method-resample_y}{\code{GOF_sim_wild_rademacher$resample_y()}} -\item \href{#method-clone}{\code{GOF_sim_wild_rademacher$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-new}{}}} -\subsection{Method \code{new()}}{ -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_sim_wild_rademacher$new(gof_model_info_extractor)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{gof_model_info_extractor}}{the info extractor that is used -to derive the residuals and fitted values for resampling.} -} -\if{html}{\out{
    }} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-resample_y}{}}} -\subsection{Method \code{resample_y()}}{ -a wild bootstrap using Rademacher random - variables to resample the dependent variable -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_sim_wild_rademacher$resample_y(model)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{model}}{see \link{GOF_model_simulator}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{GOF_model_simulator} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{GOF_sim_wild_rademacher$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/Rn1_CvM.Rd b/man/Rn1_CvM.Rd deleted file mode 100644 index 872138c..0000000 --- a/man/Rn1_CvM.Rd +++ /dev/null @@ -1,64 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Rn1_statistic.R -\name{Rn1_CvM} -\alias{Rn1_CvM} -\title{Cramer-von-Mises-statistic for marked empirical - process} -\description{ -Implements the "interface" Rn1_statistic -} -\section{Super class}{ -\code{\link[bootGOF:Rn1_statistic]{bootGOF::Rn1_statistic}} -> \code{Rn1_CvM} -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-calc_statistic}{\code{Rn1_CvM$calc_statistic()}} -\item \href{#method-clone}{\code{Rn1_CvM$clone()}} -} -} -\if{html}{ -\out{
    Inherited methods} -\itemize{ -} -\out{
    } -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-calc_statistic}{}}} -\subsection{Method \code{calc_statistic()}}{ -calculates the calculates the Cramer-von-Mises - statistic -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{Rn1_CvM$calc_statistic(Rn1)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{Rn1}}{see \link{Rn1_statistic}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{Rn1_statistic} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{Rn1_CvM$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/Rn1_KS.Rd b/man/Rn1_KS.Rd deleted file mode 100644 index 994040f..0000000 --- a/man/Rn1_KS.Rd +++ /dev/null @@ -1,63 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Rn1_statistic.R -\name{Rn1_KS} -\alias{Rn1_KS} -\title{Kolmogorov-Smirnov-statistic for marked empirical - process} -\description{ -Implements the "interface" Rn1_statistic -} -\section{Super class}{ -\code{\link[bootGOF:Rn1_statistic]{bootGOF::Rn1_statistic}} -> \code{Rn1_KS} -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-calc_statistic}{\code{Rn1_KS$calc_statistic()}} -\item \href{#method-clone}{\code{Rn1_KS$clone()}} -} -} -\if{html}{ -\out{
    Inherited methods} -\itemize{ -} -\out{
    } -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-calc_statistic}{}}} -\subsection{Method \code{calc_statistic()}}{ -calculates the Kolmogorov-Smirnov-statistic -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{Rn1_KS$calc_statistic(Rn1)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{Rn1}}{see \link{Rn1_statistic}} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -see \link{Rn1_statistic} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{Rn1_KS$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/Rn1_statistic.Rd b/man/Rn1_statistic.Rd deleted file mode 100644 index 101f403..0000000 --- a/man/Rn1_statistic.Rd +++ /dev/null @@ -1,56 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/Rn1_statistic.R -\name{Rn1_statistic} -\alias{Rn1_statistic} -\title{R6 Class representing statistics for marked - empirical processes} -\description{ -R6 does not offer interfaces. Hence all methods - are considered as abstract. -} -\section{Methods}{ -\subsection{Public methods}{ -\itemize{ -\item \href{#method-calc_statistic}{\code{Rn1_statistic$calc_statistic()}} -\item \href{#method-clone}{\code{Rn1_statistic$clone()}} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-calc_statistic}{}}} -\subsection{Method \code{calc_statistic()}}{ -Abstract function that calculates the statistic - for a given marked empirical process -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{Rn1_statistic$calc_statistic(Rn1)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{Rn1}}{marked empirical process as a double vector} -} -\if{html}{\out{
    }} -} -\subsection{Returns}{ -statistic based on \code{Rn1} -} -} -\if{html}{\out{
    }} -\if{html}{\out{}} -\if{latex}{\out{\hypertarget{method-clone}{}}} -\subsection{Method \code{clone()}}{ -The objects of this class are cloneable with this method. -\subsection{Usage}{ -\if{html}{\out{
    }}\preformatted{Rn1_statistic$clone(deep = FALSE)}\if{html}{\out{
    }} -} - -\subsection{Arguments}{ -\if{html}{\out{
    }} -\describe{ -\item{\code{deep}}{Whether to make a deep clone.} -} -\if{html}{\out{
    }} -} -} -} diff --git a/man/rrademacher.Rd b/man/rrademacher.Rd deleted file mode 100644 index c7c9bd4..0000000 --- a/man/rrademacher.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/GOF_model_simulator.R -\name{rrademacher} -\alias{rrademacher} -\title{Generates Rademacher distributed random variables} -\usage{ -rrademacher(n) -} -\arguments{ -\item{n}{number of random variables to be generated} -} -\value{ -vector of values following the Rademacher distribution -} -\description{ -Generates Rademacher distributed random variables -} diff --git a/renv.lock b/renv.lock index 2d5aa26..5dd2b2e 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.0.0", + "Version": "4.6.0", "Repositories": [ { "Name": "CRAN", @@ -9,75 +9,33 @@ ] }, "Packages": { - "BH": { - "Package": "BH", - "Version": "1.72.0-3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f9ce74c6417d61f0782cbae5fd2b7b0" - }, - "DT": { - "Package": "DT", - "Version": "0.14", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "a3580ce0309c94d061c23b0afb4accbd" - }, "MASS": { "Package": "MASS", - "Version": "7.3-51.6", + "Version": "7.3-65", "Source": "Repository", "Repository": "CRAN", - "Hash": "1dad32ac9dbd8057167b2979fb932ff7" + "Hash": "a41d0fc833ea756a1136b60a437efe26" }, "R6": { "Package": "R6", - "Version": "2.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "292b54f8f4b94669b08f94e5acce6be2" - }, - "Rcpp": { - "Package": "Rcpp", - "Version": "1.0.4.6", + "Version": "2.6.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "e652f23d8b1807cc975c51410d05b72f" - }, - "XML": { - "Package": "XML", - "Version": "3.99-0.5", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "408d42d1359f2a84d377c1f7f0568624" + "Hash": "d4335fe7207f1c01ab8c41762f5840d4" }, "askpass": { "Package": "askpass", - "Version": "1.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "e8a22846fff485f0be3770c2da758713" - }, - "assertthat": { - "Package": "assertthat", - "Version": "0.2.1", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "50c838a310445e954bc13f26f26a6ecf" + "Hash": "c39f4155b3ceb1a9a2799d700fbd4b6a" }, "backports": { "Package": "backports", - "Version": "1.1.8", + "Version": "1.5.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "3ef0eac19317fd03c0c854aed581d473" - }, - "badgecreatr": { - "Package": "badgecreatr", - "Version": "0.2.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "5db59479f84ad4a0650e74a8d8edac70" + "Hash": "e1e1b9d75c37401117b636b7ae50827a" }, "base64enc": { "Package": "base64enc", @@ -88,213 +46,206 @@ }, "brew": { "Package": "brew", - "Version": "1.0-6", + "Version": "1.0-10", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "8f4a384e19dccd8c65356dc096847b76" + }, + "brio": { + "Package": "brio", + "Version": "1.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "c1ee497a6d999947c2c224ae46799b1a" + }, + "bslib": { + "Package": "bslib", + "Version": "0.9.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "92a5f887f9ae3035ac7afde22ba73ee9" + "Hash": "70a6489cc254171fb9b4a7f130f44dca" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "cd9a672193789068eb5a2aad65a0dedf" }, "callr": { "Package": "callr", - "Version": "3.4.3", + "Version": "3.7.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "643163a00cb536454c624883a10ae0bc" + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" }, "checkmate": { "Package": "checkmate", - "Version": "2.0.0", + "Version": "2.3.3", "Source": "Repository", - "Repository": "RSPM", - "Hash": "a667800d5f0350371bedeb8b8b950289" + "Repository": "CRAN", + "Hash": "92b3b84e5789dcde37cb0c409c54553a" }, "cli": { "Package": "cli", - "Version": "2.0.2", + "Version": "3.6.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "ff0becff7bfdfe3f75d29aff8f3172dd" - }, - "clipr": { - "Package": "clipr", - "Version": "0.7.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "08cf4045c149a0f0eaf405324c7495bd" + "Hash": "16850760556401a2eeb27d39bd11c9cb" }, "commonmark": { "Package": "commonmark", - "Version": "1.7", + "Version": "2.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "0f22be39ec1d141fd03683c06f3a6e67" + "Hash": "8cba62334c1088d21689d353a7e87663" }, "covr": { "Package": "covr", - "Version": "3.5.0", + "Version": "3.6.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "cbc6df1ef6ee576f844f973c1fc04ab4" + "Hash": "0cbf0435830e767ba9b292b313592362" }, - "crayon": { - "Package": "crayon", - "Version": "1.3.4", + "cpp11": { + "Package": "cpp11", + "Version": "0.5.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d57bc8e27b7ba9e45dba825ebc0de6b" + "Hash": "2720e3fd3dad08f34b19b56b3d6f073d" }, - "crosstalk": { - "Package": "crosstalk", - "Version": "1.1.0.1", + "crayon": { + "Package": "crayon", + "Version": "1.5.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "ae55f5d7c02f0ab43c58dd050694f2b4" + "Hash": "859d96e65ef198fd43e82b9628d593ef" }, "curl": { "Package": "curl", - "Version": "4.3", + "Version": "7.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "2b7d10581cc730804e9ed178c8374bd6" + "Hash": "aa27e963d3deccf4bade44d06b976977" }, "desc": { "Package": "desc", - "Version": "1.2.0", + "Version": "1.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "6c8fe8fa26a23b79949375d372c7b395" + "Hash": "99b79fcbd6c4d1ce087f5c5c758b384f" }, - "devtools": { - "Package": "devtools", - "Version": "2.3.0", + "diffobj": { + "Package": "diffobj", + "Version": "0.3.6", "Source": "Repository", - "Repository": "RSPM", - "Hash": "d55dae3aa077e25128115a81e974f318" + "Repository": "CRAN", + "Hash": "e036ce354ab60e705ac5f40bac87e8cb" }, "digest": { "Package": "digest", - "Version": "0.6.25", + "Version": "0.6.37", "Source": "Repository", "Repository": "CRAN", - "Hash": "f697db7d92b7028c4b3436e9603fb636" + "Hash": "33698c4b3127fc9f506654607fb73676" }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.1", + "downlit": { + "Package": "downlit", + "Version": "0.4.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "fd2844b3a43ae2d27e70ece2df1b4e2a" + "Hash": "45a6a596bf0108ee1ff16a040a2df897" }, "evaluate": { "Package": "evaluate", - "Version": "0.14", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7" + "Hash": "7c29cedd515863338c7f5f77fe9ddf74" }, "fansi": { "Package": "fansi", - "Version": "0.4.1", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "7fce217eaaf8016e72065e85c73027b5" + "Hash": "962174cf2aeb5b9eea581522286a911f" }, - "fs": { - "Package": "fs", - "Version": "1.4.2", + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "8c04112383ca1988e96f429255f95675" + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" }, - "gh": { - "Package": "gh", - "Version": "1.1.0", + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "89ea5998938d1ad55f035c8a86f96b74" + "Hash": "bd1297f9b5b1fc1372d19e2c4cd82215" }, - "git2r": { - "Package": "git2r", - "Version": "0.27.1", + "fs": { + "Package": "fs", + "Version": "1.6.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "531a82d1beed1f545beb25f4f5945bf7" + "Hash": "7eb1e342eee7e0a7449c49cdaa526d39" }, "glue": { "Package": "glue", - "Version": "1.4.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "f43e0d5e85ccb0a4045670c0607ee504" - }, - "grImport": { - "Package": "grImport", - "Version": "0.9-3", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "510ede2a36dd1086c2bdc81715ad449e" - }, - "highlight": { - "Package": "highlight", - "Version": "0.5.0", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "88eee986f41177f688ffd11189cb3aec" + "Hash": "5899f1eaa825580172bb56c08266f37c" }, "highr": { "Package": "highr", - "Version": "0.8", + "Version": "0.11", "Source": "Repository", "Repository": "CRAN", - "Hash": "4dc5bb88961e347a0f4d8aad597cbfac" + "Hash": "d65ba49117ca223614f71b60d85b8ab7" }, "htmltools": { "Package": "htmltools", - "Version": "0.5.0", + "Version": "0.5.8.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "7d651b7131794fe007b1ad6f21aaa401" + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" }, - "htmlwidgets": { - "Package": "htmlwidgets", - "Version": "1.5.1", + "httr": { + "Package": "httr", + "Version": "1.4.7", "Source": "Repository", "Repository": "CRAN", - "Hash": "41bace23583fbc25089edae324de2dc3" + "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" }, - "httr": { - "Package": "httr", - "Version": "1.4.1", + "httr2": { + "Package": "httr2", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "7146fea4685b4252ebf478978c75f597" + "Hash": "6e29f1ed132b927f7d52e9fd8869f0ea" }, - "ini": { - "Package": "ini", - "Version": "0.3.1", + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "6154ec2223172bce8162d4153cda21f7" + "Hash": "5aab57a3bd297eee1c1d862735972182" }, "jsonlite": { "Package": "jsonlite", - "Version": "1.7.0", + "Version": "2.0.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "2657f20b9a74c996c602e74ebe540b06" + "Hash": "b0776f526d36d8bd4a3344a88fe165c4" }, "knitr": { "Package": "knitr", - "Version": "1.29", + "Version": "1.50", "Source": "Repository", "Repository": "CRAN", - "Hash": "e5f4c41c17df8cdf7b0df12117c0d99a" - }, - "later": { - "Package": "later", - "Version": "1.1.0.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "d0a62b247165aabf397fded504660d8a" + "Hash": "5a07d8ec459d7b80bd4acca5f4a6e062" }, "lazyeval": { "Package": "lazyeval", @@ -305,66 +256,66 @@ }, "lifecycle": { "Package": "lifecycle", - "Version": "0.2.0", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "361811f31f71f8a617a9a68bf63f1f42" + "Hash": "b8552d117e1b808b09a832f589b79035" }, "magrittr": { "Package": "magrittr", - "Version": "1.5", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "1bb58822a20301cee84a41678e25d9b7" - }, - "markdown": { - "Package": "markdown", - "Version": "1.1", + "Version": "2.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "61e4a10781dd00d7d81dd06ca9b94e95" + "Hash": "7ce2733a9826b3aeb1775d56fd305472" }, "memoise": { "Package": "memoise", - "Version": "1.1.0", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "58baa74e4603fcfb9a94401c58c8f9b1" + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" }, "mime": { "Package": "mime", - "Version": "0.9", + "Version": "0.13", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "0ec19f34c72fab674d8f2b4b1c6410e1" + }, + "minpack.lm": { + "Package": "minpack.lm", + "Version": "1.2-4", "Source": "Repository", "Repository": "CRAN", - "Hash": "e87a35ec73b157552814869f45a63aa3" + "Hash": "0d04497c6553720b3f1c2ae373c57aa9" }, "mockery": { "Package": "mockery", - "Version": "0.4.2", + "Version": "0.4.4", "Source": "Repository", - "Repository": "RSPM", - "Hash": "313fa6504824ba5aab9308412135fb5f" + "Repository": "CRAN", + "Hash": "674d86780fecdee68504452578cb010c" }, "openssl": { "Package": "openssl", - "Version": "1.4.2", + "Version": "2.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "b3209c62052922b6c629544d94c8fa8a" + "Hash": "05ce1ed077e8c97fbb3ec1cb078f1159" }, "pillar": { "Package": "pillar", - "Version": "1.4.6", + "Version": "1.11.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "bdf26e55ccb7df3e49a490150277f002" + "Hash": "10344e4bdafc6725ed83c3d6b756f4d9" }, "pkgbuild": { "Package": "pkgbuild", - "Version": "1.0.8", + "Version": "1.4.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "8d8b5e29223aabb829246397299f0592" + "Hash": "fc9fc4162e79a94f760aac8d328ee6c9" }, "pkgconfig": { "Package": "pkgconfig", @@ -375,36 +326,17 @@ }, "pkgdown": { "Package": "pkgdown", - "Version": "1.5.1", + "Version": "2.1.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "df386e7004001a999d1494cb4538c9bc" + "Hash": "c03e900e6971a37e6f987be186fd213b" }, "pkgload": { "Package": "pkgload", - "Version": "1.1.0", + "Version": "1.4.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "b6b150cd4709e0c0c9b5d51ac4376282" - }, - "plantuml": { - "Package": "plantuml", - "Version": "0.4", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "rkrug", - "RemoteRepo": "plantuml", - "RemoteRef": "master", - "RemoteSha": "4cc45be014152017b840462a2f814e5edb2cb07f", - "Hash": "bef6cceb744345f83e43c6e98a3cf528" - }, - "png": { - "Package": "png", - "Version": "0.1-7", - "Source": "Repository", - "Repository": "RSPM", - "Hash": "03b7076c234cb3331288919983326c55" + "Hash": "2ec30ffbeec83da57655b850cf2d3e0e" }, "praise": { "Package": "praise", @@ -413,236 +345,206 @@ "Repository": "CRAN", "Hash": "a555924add98c99d2f411e37e7d25e9f" }, - "prettyunits": { - "Package": "prettyunits", - "Version": "1.1.1", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "95ef9167b75dde9d2ccc3c7528393e7e" - }, "processx": { "Package": "processx", - "Version": "3.4.3", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "f4f13345fcb00c51ace12f65dd18749f" - }, - "promises": { - "Package": "promises", - "Version": "1.1.1", + "Version": "3.8.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "a8730dcbdd19f9047774909f0ec214a4" + "Hash": "720161b280b0a35f4d1490ead2fe81d0" }, "ps": { "Package": "ps", - "Version": "1.3.3", + "Version": "1.9.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "425d938eb9c02906a8ac98c0c2a306b5" + "Hash": "093688087b0bacce6ba2f661f36328e2" }, "purrr": { "Package": "purrr", - "Version": "0.3.4", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "97def703420c8ab10d8f0e6c72101e02" - }, - "rcmdcheck": { - "Package": "rcmdcheck", - "Version": "1.3.3", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "ed95895886dab6d2a584da45503555da" + "Hash": "9240cfb47489133f809918a0d3cc60cb" }, - "rematch2": { - "Package": "rematch2", - "Version": "2.1.2", + "ragg": { + "Package": "ragg", + "Version": "1.4.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "76c9e04c712a05848ae7a23d2f170a40" + "Hash": "1591adde9ce8ff7de58072e4a32b66ce" }, - "remotes": { - "Package": "remotes", - "Version": "2.2.0", + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "430a0908aee75b1fcba0e62857cab0ce" + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, "renv": { "Package": "renv", - "Version": "0.11.0", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "1c3ef87cbb81c23ac96797781ec7aecc" + "Version": "1.1.5", + "Source": "Repository" }, "rex": { "Package": "rex", - "Version": "1.2.0", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "093584b944440c5cd07a696b3c8e0e4c" + "Hash": "ae34cd56890607370665bee5bd17812f" }, "rlang": { "Package": "rlang", - "Version": "0.4.7", + "Version": "1.1.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "c06d2a6887f4b414f8e927afd9ee976a" + "Hash": "892124978869b74935dc3934c42bfe5a" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.3", + "Version": "2.29", "Source": "Repository", "Repository": "CRAN", - "Hash": "202260e1b2c410edc086d5b8f1ed946e" + "Hash": "df99277f63d01c34e95e3d2f06a79736" }, "roxygen2": { "Package": "roxygen2", - "Version": "7.1.0", + "Version": "7.3.2", "Source": "Repository", - "Repository": "RSPM", - "Hash": "f173062c04dc8e91d7376d914df6efee" + "Repository": "CRAN", + "Hash": "6ee25f9054a70f44d615300ed531ba8d" }, "rprojroot": { "Package": "rprojroot", - "Version": "1.3-2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "f6a407ae5dd21f6f80a6708bbb6eb3ae" - }, - "rstudioapi": { - "Package": "rstudioapi", - "Version": "0.11", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "33a5b27a03da82ac4b1d43268f80088a" - }, - "rversions": { - "Package": "rversions", - "Version": "2.0.2", + "Version": "2.1.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "0ec41191f744d0f5afad8c6f35cc36e4" + "Hash": "74c506458effb43d21f74750e8cd42f6" }, - "sessioninfo": { - "Package": "sessioninfo", - "Version": "1.1.1", + "sass": { + "Package": "sass", + "Version": "0.4.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "308013098befe37484df72c39cf90d6e" + "Hash": "3fb78d066fb92299b1d13f6a7c9a90a8" }, "stringi": { "Package": "stringi", - "Version": "1.4.6", + "Version": "1.8.7", "Source": "Repository", "Repository": "CRAN", - "Hash": "e99d8d656980d2dd416a962ae55aec90" + "Hash": "2b56088e23bdd58f89aebf43a0913457" }, "stringr": { "Package": "stringr", - "Version": "1.4.0", + "Version": "1.5.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "0759e6b6c0957edb1311028a49a35e76" + "Hash": "960e2ae9e09656611e0b8214ad543207" }, "sys": { "Package": "sys", - "Version": "3.3", + "Version": "3.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "507f3116a38d37ad330a038b3be07b66" + "Hash": "de342ebfebdbf40477d0758d05426646" + }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "fe31683d2c6fd9a5724bcdf8ed44ded9" }, "testthat": { "Package": "testthat", - "Version": "2.3.2", + "Version": "3.2.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "42f889439ccb14c55fc3d75c9c755056" + }, + "textshaping": { + "Package": "textshaping", + "Version": "1.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "0829b987b8961fb07f3b1b64a2fbc495" + "Hash": "75b5813527f4154cb467e4cf60911333" }, "tibble": { "Package": "tibble", - "Version": "3.0.3", + "Version": "3.3.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "08bd36bd34b20d4f7971d49e81deaab0" + "Hash": "784b27d0801c3829de602105757b2cd7" }, "tinytest": { "Package": "tinytest", - "Version": "1.2.1", + "Version": "1.4.1", "Source": "Repository", - "Repository": "RSPM", - "Hash": "af2182641bc7c5b954f1b6bb56583b45" + "Repository": "CRAN", + "Hash": "1f344373b4f0fe61b6a0d4e3d3c842ca" }, "tinytex": { "Package": "tinytex", - "Version": "0.24", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "8f24b65b86f4d6d7b1e2d8a4ce2c02fb" - }, - "usethis": { - "Package": "usethis", - "Version": "1.6.1", + "Version": "0.57", "Source": "Repository", "Repository": "CRAN", - "Hash": "e1985f5a9985fea2e338fa7eb99018ca" + "Hash": "02d65e0c0415bf36a7ddc0d2ba50a840" }, "utf8": { "Package": "utf8", - "Version": "1.1.4", + "Version": "1.2.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "4a5081acfb7b81a572e4384a7aaf2af1" + "Hash": "d526d558be176e9ceb68c3d1e83479b7" }, "vctrs": { "Package": "vctrs", - "Version": "0.3.2", + "Version": "0.6.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "5ba3006888ac62fd5e97b208d00d3317" + "Hash": "c03fa420630029418f7e6da3667aac4a" + }, + "waldo": { + "Package": "waldo", + "Version": "0.6.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "b7b91294ee9418a54527a9a9d8677597" }, "whisker": { "Package": "whisker", - "Version": "0.4", + "Version": "0.4.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "ca970b96d894e90397ed20637a0c1bbe" + "Hash": "c6abfa47a46d281a7d5159d0a8891e88" }, "withr": { "Package": "withr", - "Version": "2.2.0", + "Version": "3.0.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "ecd17882a0b4419545691e095b74ee89" + "Hash": "cc2d62c76458d425210d1eb1478b30b4" }, "xfun": { "Package": "xfun", - "Version": "0.15", + "Version": "0.53", "Source": "Repository", "Repository": "CRAN", - "Hash": "ddeca7650052ff9131ac7c41a9a77b3b" + "Hash": "1befe97a0d56060b3964e3986d408df9" }, "xml2": { "Package": "xml2", - "Version": "1.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Hash": "d4d71a75dd3ea9eb5fa28cc21f9585e2" - }, - "xopen": { - "Package": "xopen", - "Version": "1.0.0", + "Version": "1.3.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "6c85f015dee9cc7710ddd20f86881f58" + "Hash": "f5130b2f3d461964bac93cc618013231" }, "yaml": { "Package": "yaml", - "Version": "2.2.1", + "Version": "2.3.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "2826c5d9efb0a88f657c7a679c7106db" + "Hash": "51dab85c6c98e50a18d7551e9d49f76c" } } } diff --git a/tests/testthat.R b/tests/testthat.R deleted file mode 100644 index 4ea3f11..0000000 --- a/tests/testthat.R +++ /dev/null @@ -1,4 +0,0 @@ -library(testthat) -library(bootGOF) - -test_check("bootGOF") diff --git a/tests/testthat/test-dummy.R b/tests/testthat/test-dummy.R deleted file mode 100644 index 8849056..0000000 --- a/tests/testthat/test-dummy.R +++ /dev/null @@ -1,3 +0,0 @@ -test_that("multiplication works", { - expect_equal(2 * 2, 4) -}) diff --git a/tests/tinytest.R b/tests/tinytest.R index e2ca361..b8d6e2b 100644 --- a/tests/tinytest.R +++ b/tests/tinytest.R @@ -1,5 +1,3 @@ - -if ( requireNamespace("tinytest", quietly=TRUE) ){ +if (requireNamespace("tinytest", quietly = TRUE)) { tinytest::test_package("bootGOF") } -