CoolFace
Datasetpublic

SciCodePile/SciCode-Domain-Code

DATA1: Domain-Specific Code Dataset Dataset Overview DATA1 is a large-scale domain-specific code dataset focusing on code samples from interdisciplinary fields such as biology, chemistry, materials science, and related areas. The dataset is collected and organized from GitHub repositories, covering 178 different domain topics with over 1.1 billion lines of code. Dataset Statistics Total Datasets: 178 CSV files Total Data Size: ~115 GB Total Lines… See the full description on the dataset page: https://huggingface.co/datasets/SciCodePile/SciCode-Domain-Code.

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
4likes2.4kdownloads
dataset_Nowcasting.csv18187 linesDownload Raw Back to data
1"keyword","repo_name","file_path","file_extension","file_size","line_count","content","language"
2"Nowcasting","covid-19-Re/estimateR","NEWS.md",".md","141","10","NEWS3================4 5# estimateR 0.26* Added functions for simulating incidence data7* Various fixes8 9# estimateR 0.110Initial beta release11","Markdown"
12"Nowcasting","covid-19-Re/estimateR","LICENSE.md",".md","34904","596","GNU General Public License13==========================14 15_Version 3, 29 June 2007_  16_Copyright © 2007 Free Software Foundation, Inc. &lt;<http://fsf.org/>&gt;_17 18Everyone is permitted to copy and distribute verbatim copies of this license19document, but changing it is not allowed.20 21## Preamble22 23The GNU General Public License is a free, copyleft license for software and other24kinds of works.25 26The licenses for most software and other practical works are designed to take away27your freedom to share and change the works. By contrast, the GNU General Public28License is intended to guarantee your freedom to share and change all versions of a29program--to make sure it remains free software for all its users. We, the Free30Software Foundation, use the GNU General Public License for most of our software; it31applies also to any other work released this way by its authors. You can apply it to32your programs, too.33 34When we speak of free software, we are referring to freedom, not price. Our General35Public Licenses are designed to make sure that you have the freedom to distribute36copies of free software (and charge for them if you wish), that you receive source37code or can get it if you want it, that you can change the software or use pieces of38it in new free programs, and that you know you can do these things.39 40To protect your rights, we need to prevent others from denying you these rights or41asking you to surrender the rights. Therefore, you have certain responsibilities if42you distribute copies of the software, or if you modify it: responsibilities to43respect the freedom of others.44 45For example, if you distribute copies of such a program, whether gratis or for a fee,46you must pass on to the recipients the same freedoms that you received. You must make47sure that they, too, receive or can get the source code. And you must show them these48terms so they know their rights.49 50Developers that use the GNU GPL protect your rights with two steps: **(1)** assert51copyright on the software, and **(2)** offer you this License giving you legal permission52to copy, distribute and/or modify it.53 54For the developers' and authors' protection, the GPL clearly explains that there is55no warranty for this free software. For both users' and authors' sake, the GPL56requires that modified versions be marked as changed, so that their problems will not57be attributed erroneously to authors of previous versions.58 59Some devices are designed to deny users access to install or run modified versions of60the software inside them, although the manufacturer can do so. This is fundamentally61incompatible with the aim of protecting users' freedom to change the software. The62systematic pattern of such abuse occurs in the area of products for individuals to63use, which is precisely where it is most unacceptable. Therefore, we have designed64this version of the GPL to prohibit the practice for those products. If such problems65arise substantially in other domains, we stand ready to extend this provision to66those domains in future versions of the GPL, as needed to protect the freedom of67users.68 69Finally, every program is threatened constantly by software patents. States should70not allow patents to restrict development and use of software on general-purpose71computers, but in those that do, we wish to avoid the special danger that patents72applied to a free program could make it effectively proprietary. To prevent this, the73GPL assures that patents cannot be used to render the program non-free.74 75The precise terms and conditions for copying, distribution and modification follow.76 77## TERMS AND CONDITIONS78 79### 0. Definitions80 81“This License” refers to version 3 of the GNU General Public License.82 83“Copyright” also means copyright-like laws that apply to other kinds of84works, such as semiconductor masks.85 86“The Program” refers to any copyrightable work licensed under this87License. Each licensee is addressed as “you”. “Licensees” and88“recipients” may be individuals or organizations.89 90To “modify” a work means to copy from or adapt all or part of the work in91a fashion requiring copyright permission, other than the making of an exact copy. The92resulting work is called a “modified version” of the earlier work or a93work “based on” the earlier work.94 95A “covered work” means either the unmodified Program or a work based on96the Program.97 98To “propagate” a work means to do anything with it that, without99permission, would make you directly or secondarily liable for infringement under100applicable copyright law, except executing it on a computer or modifying a private101copy. Propagation includes copying, distribution (with or without modification),102making available to the public, and in some countries other activities as well.103 104To “convey” a work means any kind of propagation that enables other105parties to make or receive copies. Mere interaction with a user through a computer106network, with no transfer of a copy, is not conveying.107 108An interactive user interface displays “Appropriate Legal Notices” to the109extent that it includes a convenient and prominently visible feature that **(1)**110displays an appropriate copyright notice, and **(2)** tells the user that there is no111warranty for the work (except to the extent that warranties are provided), that112licensees may convey the work under this License, and how to view a copy of this113License. If the interface presents a list of user commands or options, such as a114menu, a prominent item in the list meets this criterion.115 116### 1. Source Code117 118The “source code” for a work means the preferred form of the work for119making modifications to it. “Object code” means any non-source form of a120work.121 122A “Standard Interface” means an interface that either is an official123standard defined by a recognized standards body, or, in the case of interfaces124specified for a particular programming language, one that is widely used among125developers working in that language.126 127The “System Libraries” of an executable work include anything, other than128the work as a whole, that **(a)** is included in the normal form of packaging a Major129Component, but which is not part of that Major Component, and **(b)** serves only to130enable use of the work with that Major Component, or to implement a Standard131Interface for which an implementation is available to the public in source code form.132A “Major Component”, in this context, means a major essential component133(kernel, window system, and so on) of the specific operating system (if any) on which134the executable work runs, or a compiler used to produce the work, or an object code135interpreter used to run it.136 137The “Corresponding Source” for a work in object code form means all the138source code needed to generate, install, and (for an executable work) run the object139code and to modify the work, including scripts to control those activities. However,140it does not include the work's System Libraries, or general-purpose tools or141generally available free programs which are used unmodified in performing those142activities but which are not part of the work. For example, Corresponding Source143includes interface definition files associated with source files for the work, and144the source code for shared libraries and dynamically linked subprograms that the work145is specifically designed to require, such as by intimate data communication or146control flow between those subprograms and other parts of the work.147 148The Corresponding Source need not include anything that users can regenerate149automatically from other parts of the Corresponding Source.150 151The Corresponding Source for a work in source code form is that same work.152 153### 2. Basic Permissions154 155All rights granted under this License are granted for the term of copyright on the156Program, and are irrevocable provided the stated conditions are met. This License157explicitly affirms your unlimited permission to run the unmodified Program. The158output from running a covered work is covered by this License only if the output,159given its content, constitutes a covered work. This License acknowledges your rights160of fair use or other equivalent, as provided by copyright law.161 162You may make, run and propagate covered works that you do not convey, without163conditions so long as your license otherwise remains in force. You may convey covered164works to others for the sole purpose of having them make modifications exclusively165for you, or provide you with facilities for running those works, provided that you166comply with the terms of this License in conveying all material for which you do not167control copyright. Those thus making or running the covered works for you must do so168exclusively on your behalf, under your direction and control, on terms that prohibit169them from making any copies of your copyrighted material outside their relationship170with you.171 172Conveying under any other circumstances is permitted solely under the conditions173stated below. Sublicensing is not allowed; section 10 makes it unnecessary.174 175### 3. Protecting Users' Legal Rights From Anti-Circumvention Law176 177No covered work shall be deemed part of an effective technological measure under any178applicable law fulfilling obligations under article 11 of the WIPO copyright treaty179adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention180of such measures.181 182When you convey a covered work, you waive any legal power to forbid circumvention of183technological measures to the extent such circumvention is effected by exercising184rights under this License with respect to the covered work, and you disclaim any185intention to limit operation or modification of the work as a means of enforcing,186against the work's users, your or third parties' legal rights to forbid circumvention187of technological measures.188 189### 4. Conveying Verbatim Copies190 191You may convey verbatim copies of the Program's source code as you receive it, in any192medium, provided that you conspicuously and appropriately publish on each copy an193appropriate copyright notice; keep intact all notices stating that this License and194any non-permissive terms added in accord with section 7 apply to the code; keep195intact all notices of the absence of any warranty; and give all recipients a copy of196this License along with the Program.197 198You may charge any price or no price for each copy that you convey, and you may offer199support or warranty protection for a fee.200 201### 5. Conveying Modified Source Versions202 203You may convey a work based on the Program, or the modifications to produce it from204the Program, in the form of source code under the terms of section 4, provided that205you also meet all of these conditions:206 207* **a)** The work must carry prominent notices stating that you modified it, and giving a208relevant date.209* **b)** The work must carry prominent notices stating that it is released under this210License and any conditions added under section 7. This requirement modifies the211requirement in section 4 to “keep intact all notices”.212* **c)** You must license the entire work, as a whole, under this License to anyone who213comes into possession of a copy. This License will therefore apply, along with any214applicable section 7 additional terms, to the whole of the work, and all its parts,215regardless of how they are packaged. This License gives no permission to license the216work in any other way, but it does not invalidate such permission if you have217separately received it.218* **d)** If the work has interactive user interfaces, each must display Appropriate Legal219Notices; however, if the Program has interactive interfaces that do not display220Appropriate Legal Notices, your work need not make them do so.221 222A compilation of a covered work with other separate and independent works, which are223not by their nature extensions of the covered work, and which are not combined with224it such as to form a larger program, in or on a volume of a storage or distribution225medium, is called an “aggregate” if the compilation and its resulting226copyright are not used to limit the access or legal rights of the compilation's users227beyond what the individual works permit. Inclusion of a covered work in an aggregate228does not cause this License to apply to the other parts of the aggregate.229 230### 6. Conveying Non-Source Forms231 232You may convey a covered work in object code form under the terms of sections 4 and2335, provided that you also convey the machine-readable Corresponding Source under the234terms of this License, in one of these ways:235 236* **a)** Convey the object code in, or embodied in, a physical product (including a237physical distribution medium), accompanied by the Corresponding Source fixed on a238durable physical medium customarily used for software interchange.239* **b)** Convey the object code in, or embodied in, a physical product (including a240physical distribution medium), accompanied by a written offer, valid for at least241three years and valid for as long as you offer spare parts or customer support for242that product model, to give anyone who possesses the object code either **(1)** a copy of243the Corresponding Source for all the software in the product that is covered by this244License, on a durable physical medium customarily used for software interchange, for245a price no more than your reasonable cost of physically performing this conveying of246source, or **(2)** access to copy the Corresponding Source from a network server at no247charge.248* **c)** Convey individual copies of the object code with a copy of the written offer to249provide the Corresponding Source. This alternative is allowed only occasionally and250noncommercially, and only if you received the object code with such an offer, in251accord with subsection 6b.252* **d)** Convey the object code by offering access from a designated place (gratis or for253a charge), and offer equivalent access to the Corresponding Source in the same way254through the same place at no further charge. You need not require recipients to copy255the Corresponding Source along with the object code. If the place to copy the object256code is a network server, the Corresponding Source may be on a different server257(operated by you or a third party) that supports equivalent copying facilities,258provided you maintain clear directions next to the object code saying where to find259the Corresponding Source. Regardless of what server hosts the Corresponding Source,260you remain obligated to ensure that it is available for as long as needed to satisfy261these requirements.262* **e)** Convey the object code using peer-to-peer transmission, provided you inform263other peers where the object code and Corresponding Source of the work are being264offered to the general public at no charge under subsection 6d.265 266A separable portion of the object code, whose source code is excluded from the267Corresponding Source as a System Library, need not be included in conveying the268object code work.269 270A “User Product” is either **(1)** a “consumer product”, which271means any tangible personal property which is normally used for personal, family, or272household purposes, or **(2)** anything designed or sold for incorporation into a273dwelling. In determining whether a product is a consumer product, doubtful cases274shall be resolved in favor of coverage. For a particular product received by a275particular user, “normally used” refers to a typical or common use of276that class of product, regardless of the status of the particular user or of the way277in which the particular user actually uses, or expects or is expected to use, the278product. A product is a consumer product regardless of whether the product has279substantial commercial, industrial or non-consumer uses, unless such uses represent280the only significant mode of use of the product.281 282“Installation Information” for a User Product means any methods,283procedures, authorization keys, or other information required to install and execute284modified versions of a covered work in that User Product from a modified version of285its Corresponding Source. The information must suffice to ensure that the continued286functioning of the modified object code is in no case prevented or interfered with287solely because modification has been made.288 289If you convey an object code work under this section in, or with, or specifically for290use in, a User Product, and the conveying occurs as part of a transaction in which291the right of possession and use of the User Product is transferred to the recipient292in perpetuity or for a fixed term (regardless of how the transaction is293characterized), the Corresponding Source conveyed under this section must be294accompanied by the Installation Information. But this requirement does not apply if295neither you nor any third party retains the ability to install modified object code296on the User Product (for example, the work has been installed in ROM).297 298The requirement to provide Installation Information does not include a requirement to299continue to provide support service, warranty, or updates for a work that has been300modified or installed by the recipient, or for the User Product in which it has been301modified or installed. Access to a network may be denied when the modification itself302materially and adversely affects the operation of the network or violates the rules303and protocols for communication across the network.304 305Corresponding Source conveyed, and Installation Information provided, in accord with306this section must be in a format that is publicly documented (and with an307implementation available to the public in source code form), and must require no308special password or key for unpacking, reading or copying.309 310### 7. Additional Terms311 312“Additional permissions” are terms that supplement the terms of this313License by making exceptions from one or more of its conditions. Additional314permissions that are applicable to the entire Program shall be treated as though they315were included in this License, to the extent that they are valid under applicable316law. If additional permissions apply only to part of the Program, that part may be317used separately under those permissions, but the entire Program remains governed by318this License without regard to the additional permissions.319 320When you convey a copy of a covered work, you may at your option remove any321additional permissions from that copy, or from any part of it. (Additional322permissions may be written to require their own removal in certain cases when you323modify the work.) You may place additional permissions on material, added by you to a324covered work, for which you have or can give appropriate copyright permission.325 326Notwithstanding any other provision of this License, for material you add to a327covered work, you may (if authorized by the copyright holders of that material)328supplement the terms of this License with terms:329 330* **a)** Disclaiming warranty or limiting liability differently from the terms of331sections 15 and 16 of this License; or332* **b)** Requiring preservation of specified reasonable legal notices or author333attributions in that material or in the Appropriate Legal Notices displayed by works334containing it; or335* **c)** Prohibiting misrepresentation of the origin of that material, or requiring that336modified versions of such material be marked in reasonable ways as different from the337original version; or338* **d)** Limiting the use for publicity purposes of names of licensors or authors of the339material; or340* **e)** Declining to grant rights under trademark law for use of some trade names,341trademarks, or service marks; or342* **f)** Requiring indemnification of licensors and authors of that material by anyone343who conveys the material (or modified versions of it) with contractual assumptions of344liability to the recipient, for any liability that these contractual assumptions345directly impose on those licensors and authors.346 347All other non-permissive additional terms are considered “further348restrictions” within the meaning of section 10. If the Program as you received349it, or any part of it, contains a notice stating that it is governed by this License350along with a term that is a further restriction, you may remove that term. If a351license document contains a further restriction but permits relicensing or conveying352under this License, you may add to a covered work material governed by the terms of353that license document, provided that the further restriction does not survive such354relicensing or conveying.355 356If you add terms to a covered work in accord with this section, you must place, in357the relevant source files, a statement of the additional terms that apply to those358files, or a notice indicating where to find the applicable terms.359 360Additional terms, permissive or non-permissive, may be stated in the form of a361separately written license, or stated as exceptions; the above requirements apply362either way.363 364### 8. Termination365 366You may not propagate or modify a covered work except as expressly provided under367this License. Any attempt otherwise to propagate or modify it is void, and will368automatically terminate your rights under this License (including any patent licenses369granted under the third paragraph of section 11).370 371However, if you cease all violation of this License, then your license from a372particular copyright holder is reinstated **(a)** provisionally, unless and until the373copyright holder explicitly and finally terminates your license, and **(b)** permanently,374if the copyright holder fails to notify you of the violation by some reasonable means375prior to 60 days after the cessation.376 377Moreover, your license from a particular copyright holder is reinstated permanently378if the copyright holder notifies you of the violation by some reasonable means, this379is the first time you have received notice of violation of this License (for any380work) from that copyright holder, and you cure the violation prior to 30 days after381your receipt of the notice.382 383Termination of your rights under this section does not terminate the licenses of384parties who have received copies or rights from you under this License. If your385rights have been terminated and not permanently reinstated, you do not qualify to386receive new licenses for the same material under section 10.387 388### 9. Acceptance Not Required for Having Copies389 390You are not required to accept this License in order to receive or run a copy of the391Program. Ancillary propagation of a covered work occurring solely as a consequence of392using peer-to-peer transmission to receive a copy likewise does not require393acceptance. However, nothing other than this License grants you permission to394propagate or modify any covered work. These actions infringe copyright if you do not395accept this License. Therefore, by modifying or propagating a covered work, you396indicate your acceptance of this License to do so.397 398### 10. Automatic Licensing of Downstream Recipients399 400Each time you convey a covered work, the recipient automatically receives a license401from the original licensors, to run, modify and propagate that work, subject to this402License. You are not responsible for enforcing compliance by third parties with this403License.404 405An “entity transaction” is a transaction transferring control of an406organization, or substantially all assets of one, or subdividing an organization, or407merging organizations. If propagation of a covered work results from an entity408transaction, each party to that transaction who receives a copy of the work also409receives whatever licenses to the work the party's predecessor in interest had or410could give under the previous paragraph, plus a right to possession of the411Corresponding Source of the work from the predecessor in interest, if the predecessor412has it or can get it with reasonable efforts.413 414You may not impose any further restrictions on the exercise of the rights granted or415affirmed under this License. For example, you may not impose a license fee, royalty,416or other charge for exercise of rights granted under this License, and you may not417initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging418that any patent claim is infringed by making, using, selling, offering for sale, or419importing the Program or any portion of it.420 421### 11. Patents422 423A “contributor” is a copyright holder who authorizes use under this424License of the Program or a work on which the Program is based. The work thus425licensed is called the contributor's “contributor version”.426 427A contributor's “essential patent claims” are all patent claims owned or428controlled by the contributor, whether already acquired or hereafter acquired, that429would be infringed by some manner, permitted by this License, of making, using, or430selling its contributor version, but do not include claims that would be infringed431only as a consequence of further modification of the contributor version. For432purposes of this definition, “control” includes the right to grant patent433sublicenses in a manner consistent with the requirements of this License.434 435Each contributor grants you a non-exclusive, worldwide, royalty-free patent license436under the contributor's essential patent claims, to make, use, sell, offer for sale,437import and otherwise run, modify and propagate the contents of its contributor438version.439 440In the following three paragraphs, a “patent license” is any express441agreement or commitment, however denominated, not to enforce a patent (such as an442express permission to practice a patent or covenant not to sue for patent443infringement). To “grant” such a patent license to a party means to make444such an agreement or commitment not to enforce a patent against the party.445 446If you convey a covered work, knowingly relying on a patent license, and the447Corresponding Source of the work is not available for anyone to copy, free of charge448and under the terms of this License, through a publicly available network server or449other readily accessible means, then you must either **(1)** cause the Corresponding450Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the451patent license for this particular work, or **(3)** arrange, in a manner consistent with452the requirements of this License, to extend the patent license to downstream453recipients. “Knowingly relying” means you have actual knowledge that, but454for the patent license, your conveying the covered work in a country, or your455recipient's use of the covered work in a country, would infringe one or more456identifiable patents in that country that you have reason to believe are valid.457 458If, pursuant to or in connection with a single transaction or arrangement, you459convey, or propagate by procuring conveyance of, a covered work, and grant a patent460license to some of the parties receiving the covered work authorizing them to use,461propagate, modify or convey a specific copy of the covered work, then the patent462license you grant is automatically extended to all recipients of the covered work and463works based on it.464 465A patent license is “discriminatory” if it does not include within the466scope of its coverage, prohibits the exercise of, or is conditioned on the467non-exercise of one or more of the rights that are specifically granted under this468License. You may not convey a covered work if you are a party to an arrangement with469a third party that is in the business of distributing software, under which you make470payment to the third party based on the extent of your activity of conveying the471work, and under which the third party grants, to any of the parties who would receive472the covered work from you, a discriminatory patent license **(a)** in connection with473copies of the covered work conveyed by you (or copies made from those copies), or **(b)**474primarily for and in connection with specific products or compilations that contain475the covered work, unless you entered into that arrangement, or that patent license476was granted, prior to 28 March 2007.477 478Nothing in this License shall be construed as excluding or limiting any implied479license or other defenses to infringement that may otherwise be available to you480under applicable patent law.481 482### 12. No Surrender of Others' Freedom483 484If conditions are imposed on you (whether by court order, agreement or otherwise)485that contradict the conditions of this License, they do not excuse you from the486conditions of this License. If you cannot convey a covered work so as to satisfy487simultaneously your obligations under this License and any other pertinent488obligations, then as a consequence you may not convey it at all. For example, if you489agree to terms that obligate you to collect a royalty for further conveying from490those to whom you convey the Program, the only way you could satisfy both those terms491and this License would be to refrain entirely from conveying the Program.492 493### 13. Use with the GNU Affero General Public License494 495Notwithstanding any other provision of this License, you have permission to link or496combine any covered work with a work licensed under version 3 of the GNU Affero497General Public License into a single combined work, and to convey the resulting work.498The terms of this License will continue to apply to the part which is the covered499work, but the special requirements of the GNU Affero General Public License, section50013, concerning interaction through a network will apply to the combination as such.501 502### 14. Revised Versions of this License503 504The Free Software Foundation may publish revised and/or new versions of the GNU505General Public License from time to time. Such new versions will be similar in spirit506to the present version, but may differ in detail to address new problems or concerns.507 508Each version is given a distinguishing version number. If the Program specifies that509a certain numbered version of the GNU General Public License “or any later510version” applies to it, you have the option of following the terms and511conditions either of that numbered version or of any later version published by the512Free Software Foundation. If the Program does not specify a version number of the GNU513General Public License, you may choose any version ever published by the Free514Software Foundation.515 516If the Program specifies that a proxy can decide which future versions of the GNU517General Public License can be used, that proxy's public statement of acceptance of a518version permanently authorizes you to choose that version for the Program.519 520Later license versions may give you additional or different permissions. However, no521additional obligations are imposed on any author or copyright holder as a result of522your choosing to follow a later version.523 524### 15. Disclaimer of Warranty525 526THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.527EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES528PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER529EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF530MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE531QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE532DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.533 534### 16. Limitation of Liability535 536IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY537COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS538PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,539INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE540PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE541OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE542WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE543POSSIBILITY OF SUCH DAMAGES.544 545### 17. Interpretation of Sections 15 and 16546 547If the disclaimer of warranty and limitation of liability provided above cannot be548given local legal effect according to their terms, reviewing courts shall apply local549law that most closely approximates an absolute waiver of all civil liability in550connection with the Program, unless a warranty or assumption of liability accompanies551a copy of the Program in return for a fee.552 553_END OF TERMS AND CONDITIONS_554 555## How to Apply These Terms to Your New Programs556 557If you develop a new program, and you want it to be of the greatest possible use to558the public, the best way to achieve this is to make it free software which everyone559can redistribute and change under these terms.560 561To do so, attach the following notices to the program. It is safest to attach them562to the start of each source file to most effectively state the exclusion of warranty;563and each file should have at least the “copyright” line and a pointer to564where the full notice is found.565 566    <one line to give the program's name and a brief idea of what it does.>567    Copyright (C) <year>  <name of author>568 569    This program is free software: you can redistribute it and/or modify570    it under the terms of the GNU General Public License as published by571    the Free Software Foundation, either version 3 of the License, or572    (at your option) any later version.573 574    This program is distributed in the hope that it will be useful,575    but WITHOUT ANY WARRANTY; without even the implied warranty of576    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the577    GNU General Public License for more details.578 579    You should have received a copy of the GNU General Public License580    along with this program.  If not, see <http://www.gnu.org/licenses/>.581 582Also add information on how to contact you by electronic and paper mail.583 584If the program does terminal interaction, make it output a short notice like this585when it starts in an interactive mode:586 587    <program>  Copyright (C) <year>  <name of author>588    This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.589    This is free software, and you are welcome to redistribute it590    under certain conditions; type 'show c' for details.591 592The hypothetical commands `show w` and `show c` should show the appropriate parts of593the General Public License. Of course, your program's commands might be different;594for a GUI interface, you would use an “about box”.595 596You should also get your employer (if you work as a programmer) or school, if any, to597sign a “copyright disclaimer” for the program, if necessary. For more598information on this, and how to apply and follow the GNU GPL, see599&lt;<http://www.gnu.org/licenses/>&gt;.600 601The GNU General Public License does not permit incorporating your program into602proprietary programs. If your program is a subroutine library, you may consider it603more useful to permit linking proprietary applications with the library. If this is604what you want to do, use the GNU Lesser General Public License instead of this605License. But first, please read606&lt;<http://www.gnu.org/philosophy/why-not-lgpl.html>&gt;.607","Markdown"
608"Nowcasting","covid-19-Re/estimateR","man/examples/make_tibble_from_output.R",".R","447","17","## Basic usage of make_tibble_from_output609 610smoothed_incidence <- smooth_incidence(611  incidence_data = HK_incidence_data$case_incidence,612  smoothing_method = ""LOESS""613)614 615smoothed_incidence_tibble_1 <- make_tibble_from_output(smoothed_incidence)616 617 618## Advanced usage of make_tibble_from_output619 620smoothed_incidence_tibble_2 <- make_tibble_from_output(621  output = smoothed_incidence,622  output_name = ""incidence"",623  ref_date = HK_incidence_data$date[1]624)","R"
625"Nowcasting","covid-19-Re/estimateR","man/examples/convolve_delays.R",".R","2031","55","## Convolving the delay between infection and onset of symptoms with the delay626# between onset of symptoms and case report to obtain the final delay between627# infection and case report. Using the resulting delay distribution to recover628# the original infection events629 630smoothed_incidence <- smooth_incidence(HK_incidence_data$case_incidence)631 632shape_incubation = 3.2633scale_incubation = 1.3634delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)635 636shape_onset_to_report = 2.7637scale_onset_to_report = 1.6638delay_onset_to_report <- list(name=""gamma"",639                              shape = shape_onset_to_report,640                              scale = scale_onset_to_report)641 642total_delay_1 <- convolve_delays(list(delay_incubation, delay_onset_to_report))643 644deconvolved_incidence <- deconvolve_incidence(645  incidence_data = smoothed_incidence,646  delay = total_delay_1647)648 649## Convolving multiple delays650# In this example it is assumed that the delay between infection and case report651# is composed of three delays; the delay between infection and symptom onset,652# the delay between symptom onset and case testing653 654shape_incubation = 3.2655scale_incubation = 1.3656delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)657 658delay_onset_to_test_taken <- list(name = ""norm"", mean = 5, sd = 2)659 660delay_test_to_report <- list(name=""norm"", mean = 2, sd = 0.5)661 662total_delay_2 <- convolve_delays(list(delay_incubation,663                                      delay_onset_to_test_taken,664                                      delay_test_to_report))665 666## Convolving delays of multiple types667# Defining the incubation period as a probability vector, and the delay between668# symptom onset and case observation as a delay matrix669 670delay_incubation <- c(0.01, 0.1, 0.15, 0.18, 0.17, 0.14, 0.11, 0.07, 0.035, 0.020, 0.015)671 672delay_matrix <- get_matrix_from_empirical_delay_distr(673  HK_delay_data,674  n_report_time_steps = 50675)676 677total_delay_3 <- convolve_delays(list(delay_incubation, delay_matrix))678 679","R"
680"Nowcasting","covid-19-Re/estimateR","man/examples/deconvolve_incidence.R",".R","2406","68","smoothed_onset_incidence <- smooth_incidence(HK_incidence_data$onset_incidence)681smoothed_case_incidence <- smooth_incidence(HK_incidence_data$case_incidence)682 683## Deconvolving symptom onset data.684# In case the data to be deconvolved represents noisy observations of symptom685# onset, only the delay distribution of the incubation time needs to be specified686# (time that passes between case incidence and showing of symptoms).687 688shape_incubation = 3.2689scale_incubation = 1.3690delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)691 692deconvolved_incidence_1 <- deconvolve_incidence(693  incidence_data = smoothed_onset_incidence,694  delay = delay_incubation695)696 697 698## Deconvolving report incidence data.699# In case the data to be deconvolved represents noisy observations of case reports,700# both the delay distribution of the incubation time and the delay distribution701# of the time that passes between symptom onset and the case being reported.702 703shape_onset_to_report = 2.7704scale_onset_to_report = 1.6705delay_onset_to_report <- list(name=""gamma"",706                              shape = shape_onset_to_report,707                              scale = scale_onset_to_report)708 709deconvolved_incidence_2 <- deconvolve_incidence(710  incidence_data = smoothed_case_incidence,711  delay = list(delay_incubation, delay_onset_to_report)712)713 714 715## Other available formats for specifying delay distributions716 717# Discretized delay distribution vector718mean_incubation = 5.2719std_incubation = 1.6720delay_distribution_incubation <- list(name=""norm"",721                                      mean = mean_incubation,722                                      sd = std_incubation)723delay_incubation_vector <- build_delay_distribution(delay_distribution_incubation)724 725deconvolved_incidence_3 <- deconvolve_incidence(726  incidence_data = smoothed_onset_incidence,727  delay = delay_incubation_vector728)729 730# Discretized delay distribution matrix731delay_distribution_matrix <- get_matrix_from_empirical_delay_distr(732  HK_delay_data,733  n_report_time_steps = length(smoothed_case_incidence)734)735deconvolved_incidence_4 <- deconvolve_incidence(736  incidence_data = smoothed_case_incidence,737  delay = list(delay_incubation, delay_distribution_matrix)738)739 740# Dataframe containing empirical delay data741deconvolved_incidence_5 <- deconvolve_incidence(742  incidence_data = smoothed_case_incidence,743  delay = list(delay_incubation, HK_delay_data)744)745 746 747","R"
748"Nowcasting","covid-19-Re/estimateR","man/examples/simulate_infections.R",".R","785","24","## Basic usage of simulate_infections749# Simulating infection incidence corresponding to a drop in Re value from 2.3750# to 0.5, at the half of the time period, then recovering the Re values using the751# estimate_Re function752 753Re_evolution <- c(rep(2.3, 100), rep(0.5, 100))754simulated_incidence_1 <- simulate_infections(755  Rt = Re_evolution756)757Re_recovered_1 <- estimate_Re(simulated_incidence_1)758 759 760## Advanced usage of simulate_infections761# Simulating infection incidence using the same Re progression as above, but a762# assuming a constant import of 100 cases per day763 764imported_infections <- rep(100, length(Re_evolution))765simulated_incidence_2 <- simulate_infections(766  Rt = Re_evolution,767  imported_infections = imported_infections768)769Re_recovered_2 <- estimate_Re(simulated_incidence_2)770 771","R"
772"Nowcasting","covid-19-Re/estimateR","man/examples/get_matrix_from_empirical_delay_distr.R",".R","1482","41","## Basic usage of get_matrix_from_empirical_delay_distr773# Obtaining the deconvolved incidence for the full HK incidence data provided in774# the package: obtaining the delay matrix and then using it to recover the 775# deconvolved incidence.776 777smoothed_incidence <- smooth_incidence(HK_incidence_data$case_incidence)778 779shape_incubation = 3.2 780scale_incubation = 1.3781delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)782 783delay_matrix_1 <- get_matrix_from_empirical_delay_distr(784  HK_delay_data, 785  n_report_time_steps = length(smoothed_incidence)786)787 788deconvolved_incidence_1 <- deconvolve_incidence(789  incidence_data = smoothed_incidence,790  delay = list(delay_incubation, delay_matrix_1)791)792 793 794## Advanced usage of get_matrix_from_empirical_delay_distr795# Obtaining the deconvolved incidence for a section of the HK incidence data 796# provided in the package: computing the delay matrix, fitting gamma distributions 797# to the columns and then using it to recover the deconvolved incidence for the 798# time-frame of interest799 800smoothed_partial_incidence <- smooth_incidence(HK_incidence_data[30:90,]$case_incidence)801 802delay_matrix_2 <- get_matrix_from_empirical_delay_distr(803  HK_delay_data, 804  n_report_time_steps = length(smoothed_partial_incidence),805  fit = ""gamma"",806  ref_date = HK_incidence_data[30,]$date807)808 809deconvolved_incidence_2 <- deconvolve_incidence(810  incidence_data = smoothed_partial_incidence,811  delay = list(delay_incubation, delay_matrix_2)812)","R"
813"Nowcasting","covid-19-Re/estimateR","man/examples/estimate_Re_from_noisy_delayed_incidence.R",".R","2012","48","## Basic usage of estimate_Re_from_noisy_delayed_incidence814shape_incubation = 3.2815scale_incubation = 1.3816delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)817 818shape_onset_to_report = 2.7819scale_onset_to_report = 1.6820delay_onset_to_report <- list(name=""gamma"",821                              shape = shape_onset_to_report,822                              scale = scale_onset_to_report)823 824Re_estimate_1 <- estimate_Re_from_noisy_delayed_incidence(825  incidence_data = HK_incidence_data$case_incidence,826  delay = list(delay_incubation, delay_onset_to_report)827)828 829## Advanced usage of estimate_Re_from_noisy_delayed_incidence830# Incorporating prior knowledge over Re. Here, Re is assumed constant over a time831# frame of one week, with a prior mean of 1.25.832Re_estimate_2 <- estimate_Re_from_noisy_delayed_incidence(833  incidence_data = HK_incidence_data$case_incidence,834  delay = list(delay_incubation, delay_onset_to_report),835  estimation_method = ""EpiEstim piecewise constant"",836  interval_length = 7,837  mean_Re_prior = 1.25838)839 840# Incorporating prior knowledge over the disease. Here, the mean of the serial841# interval is assumed to be 5 days, and the standard deviation is assumed to be842# 2.5 days.843Re_estimate_3 <- estimate_Re_from_noisy_delayed_incidence(844  incidence_data = HK_incidence_data$case_incidence,845  delay = list(delay_incubation, delay_onset_to_report),846  mean_serial_interval = 5,847  std_serial_interval = 1.25848)849 850# Incorporating prior knowledge over the epidemic. Here, it is assumed that Re851# changes values 4 times during the epidemic, so the intervals over which Re is852# assumed to be constant are passed as a parameter.853last_interval_index <- length(HK_incidence_data$case_incidence)854Re_estimate_4 <- estimate_Re_from_noisy_delayed_incidence(855  incidence_data = HK_incidence_data$case_incidence,856  delay = list(delay_incubation, delay_onset_to_report),857  estimation_method = ""EpiEstim piecewise constant"",858  interval_ends = c(50, 75, 100, 160, last_interval_index)859)860","R"
861"Nowcasting","covid-19-Re/estimateR","man/examples/estimate_from_combined_observations.R",".R","2465","61","shape_incubation = 3.2862scale_incubation = 1.3863delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)864 865shape_onset_to_report = 2.7866scale_onset_to_report = 1.6867delay_onset_to_report <- list(name=""gamma"",868                              shape = shape_onset_to_report,869                              scale = scale_onset_to_report)870 871 872## Basic usage of estimate_from_combined_observations873Re_estimate_1 <- estimate_from_combined_observations(874  partially_delayed_incidence = HK_incidence_data$onset_incidence,875  fully_delayed_incidence = HK_incidence_data$report_incidence,876  partial_observation_requires_full_observation = TRUE,877  delay_until_partial = delay_incubation,878  delay_until_final_report = delay_onset_to_report879)880 881 882## Advanced usage of estimate_from_combined_observations883 884# Getting a more verbose result. Adding a date column and returning intermediate885# results as well as the Re estimate.886Re_estimate_2 <- estimate_from_combined_observations(887  partially_delayed_incidence = HK_incidence_data$onset_incidence,888  fully_delayed_incidence = HK_incidence_data$report_incidence,889  partial_observation_requires_full_observation = TRUE,890  delay_until_partial = delay_incubation,891  delay_until_final_report = delay_onset_to_report,892  ref_date = HK_incidence_data$date[1],893  output_Re_only = FALSE894)895 896# Incorporating prior knowledge over Re. Here, Re is assumed constant over a time897# frame of one week, with a prior mean of 1.25.898Re_estimate_3 <- estimate_from_combined_observations(899  partially_delayed_incidence = HK_incidence_data$onset_incidence,900  fully_delayed_incidence = HK_incidence_data$report_incidence,901  partial_observation_requires_full_observation = TRUE,902  delay_until_partial = delay_incubation,903  delay_until_final_report = delay_onset_to_report,904  estimation_method = 'EpiEstim piecewise constant',905  interval_length = 7,906  mean_Re_prior = 1.25907)908 909# Incorporating prior knowledge over the disease. Here, the mean of the serial910# interval is assumed to be 5 days, and the standard deviation is assumed to be911# 2.5 days.912Re_estimate_4 <- estimate_from_combined_observations(913  partially_delayed_incidence = HK_incidence_data$onset_incidence,914  fully_delayed_incidence = HK_incidence_data$report_incidence,915  partial_observation_requires_full_observation = TRUE,916  delay_until_partial = delay_incubation,917  delay_until_final_report = delay_onset_to_report,918  mean_serial_interval = 5,919  std_serial_interval = 2.5920)921","R"
922"Nowcasting","covid-19-Re/estimateR","man/examples/simulate_combined_observations.R",".R","1313","35","## Basic use of simulate_combined_observations923# Simulating combined observations, assuming two gamma delays between infection924# and symptom onset, and symptom onset and case report respectively. It is assumed925# that 20% of the cases are observed as partially-delayed observations.926 927Re_evolution <- c(rep(2.3, 100))928incidence <- simulate_infections(Re_evolution)929 930shape_incubation = 3.2931scale_incubation = 1.3932delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)933 934shape_onset_to_report = 2.7935scale_onset_to_report = 1.6936delay_onset_to_report <- list(name=""gamma"",937                              shape = shape_onset_to_report,938                              scale = scale_onset_to_report)939simulated_combined_observations_1 <- simulate_combined_observations(940  incidence,941  delay_until_partial = delay_incubation,942  delay_until_final_report = delay_onset_to_report,943  prob_partial_observation = 0.2944)945 946## Advanced use of simulate_combined_observations947# Adding gaussian noise to the combined observations simulated above.948simulated_combined_observations_2 <- simulate_combined_observations(949  incidence,950  delay_until_partial = delay_incubation,951  delay_until_final_report = delay_onset_to_report,952  prob_partial_observation = 0.2,953  noise = list(type = 'gaussian', sd = 0.8)954)955 956","R"
957"Nowcasting","covid-19-Re/estimateR","man/examples/get_bootstrap_replicate.R",".R","468","18","## Basic usage of get_bootstrap_replicate958 959bootstrap_replicate_1 <- get_bootstrap_replicate(960  HK_incidence_data$case_incidence961)962 963 964## Advanced usage of get_bootstrap_replicate965# Generate a bootstrap replicate of the incidence data, where case numbers are966# allowed to be decimal numbers, and the output is return as a list.967 968bootstrap_replicate_2 <- get_bootstrap_replicate(969  HK_incidence_data$case_incidence,970  simplify_output = FALSE,971  round_incidence = FALSE972)973 974","R"
975"Nowcasting","covid-19-Re/estimateR","man/examples/get_bootstrapped_estimates_from_combined_observations.R",".R","2338","59","## Basic usage of get_bootstrapped_estimates_from_combined_observations976# (Only 10 bootstrap replicates are generated to keep the code fast. In practice,977# use more.)978 979shape_incubation = 3.2980scale_incubation = 1.3981delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)982 983shape_onset_to_report = 2.7984scale_onset_to_report = 1.6985delay_onset_to_report <- list(name=""gamma"",986                              shape = shape_onset_to_report,987                              scale = scale_onset_to_report)988 989 990Re_estimate_1 <- get_bootstrapped_estimates_from_combined_observations(991  partially_delayed_incidence = HK_incidence_data$onset_incidence,992  fully_delayed_incidence = HK_incidence_data$report_incidence,993  partial_observation_requires_full_observation = TRUE,994  delay_until_partial = delay_incubation,995  delay_until_final_report = delay_onset_to_report,996  N_bootstrap_replicates = 10997)998 999 1000## Advanced usage of get_bootstrapped_estimates_from_combined_observations1001# Incorporating prior knowledge over Re. Here, Re is assumed constant over a time1002# frame of one week, with a prior mean of 1.25.1003Re_estimate_2 <- get_bootstrapped_estimates_from_combined_observations(1004  partially_delayed_incidence = HK_incidence_data$onset_incidence,1005  fully_delayed_incidence = HK_incidence_data$report_incidence,1006  partial_observation_requires_full_observation = TRUE,1007  delay_until_partial = delay_incubation,1008  delay_until_final_report = delay_onset_to_report,1009  N_bootstrap_replicates = 10,1010  estimation_method = 'EpiEstim piecewise constant',1011  interval_length = 7,1012  mean_Re_prior = 1.25,1013  ref_date = HK_incidence_data$date[1]1014)1015 1016 1017# Incorporating prior knowledge over the disease. Here, we assume the mean of the1018# serial interval to be 5 days, and the deviation is assumed to be 2.5 days. The1019# delay between symptom onset and case confirmation is passed as empirical data.1020Re_estimate_3 <- get_bootstrapped_estimates_from_combined_observations(1021  partially_delayed_incidence = HK_incidence_data$onset_incidence,1022  fully_delayed_incidence = HK_incidence_data$report_incidence,1023  partial_observation_requires_full_observation = TRUE,1024  delay_until_partial = delay_incubation,1025  delay_until_final_report = delay_onset_to_report,1026  N_bootstrap_replicates = 10,1027  mean_serial_interval = 5,1028  std_serial_interval = 2.51029)1030 1031 1032 1033","R"
1034"Nowcasting","covid-19-Re/estimateR","man/examples/get_block_bootstrapped_estimate.R",".R","1859","54","## Basic usage of get_block_bootstrapped_estimate1035# (Only 10 bootstrap replicates are generated to keep the code fast. In practice,1036# use more.)1037 1038shape_incubation = 3.21039scale_incubation = 1.31040delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)1041 1042shape_onset_to_report = 2.71043scale_onset_to_report = 1.61044delay_onset_to_report <- list(name=""gamma"",1045                              shape = shape_onset_to_report,1046                              scale = scale_onset_to_report)1047 1048 1049Re_estimate_1 <- get_block_bootstrapped_estimate(1050  HK_incidence_data$case_incidence,1051  N_bootstrap_replicates = 10,1052  delay = list(delay_incubation, delay_onset_to_report)1053)1054 1055 1056## Advanced usage of get_block_bootstrapped_estimate1057# (Only 10 bootstrap replicates are generated to keep the code fast. In practice,1058# use more.)1059 1060 1061# Incorporating prior knowledge over Re. Here, Re is assumed constant over a time1062# frame of one week, with a prior mean of 1.25.1063 1064Re_estimate_2 <- get_block_bootstrapped_estimate(1065  HK_incidence_data$case_incidence,1066  N_bootstrap_replicates = 10,1067  delay = list(delay_incubation, HK_delay_data),1068  ref_date = HK_incidence_data$date[1],1069  estimation_method = 'EpiEstim piecewise constant',1070  interval_length = 7,1071  uncertainty_summary_method = 'bagged mean - CI from bootstrap estimates',1072  mean_Re_prior = 1.251073)1074 1075# Incorporating prior knowledge over the disease. Here, we assume the mean of the1076# serial interval to be 5 days, and the deviation is assumed to be 2.5 days. The1077# delay between symptom onset and case confirmation is passed as empirical data.1078 1079Re_estimate_3 <- get_block_bootstrapped_estimate(1080  HK_incidence_data$case_incidence,1081  N_bootstrap_replicates = 10,1082  delay = list(delay_incubation, HK_delay_data),1083  ref_date = HK_incidence_data$date[1],1084  mean_serial_interval = 5,1085  std_serial_interval = 2.51086)1087","R"
1088"Nowcasting","covid-19-Re/estimateR","man/examples/simulate_delayed_observations.R",".R","1314","40","## Basic usage of simulate_delayed_observations1089# Simulating a series of delayed observations of infections generated by an 1090# infection with a Re of 1.2. The delays of the observations follow a normal1091# distribution.1092set.seed(7)1093infections <- simulate_infections(rep(1.5, 100))1094 1095 1096delay <- list(name=""norm"", mean = 7, sd = 2)1097 1098delayed_observations_1 <- simulate_delayed_observations(1099  infections,1100  delay = delay1101)1102 1103## Advanced usage of simulate_delayed_observations1104# Simulating delayed observations using the same infections as above, but assuming1105# the observation is delayed by a convolution of two different delays1106 1107shape_incubation = 3.21108scale_incubation = 1.31109delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)1110 1111shape_onset_to_report = 2.71112scale_onset_to_report = 1.61113delay_onset_to_report <- list(name=""gamma"",1114                              shape = shape_onset_to_report,1115                              scale = scale_onset_to_report)1116 1117delayed_observations_2 <- simulate_delayed_observations(1118  infections,1119  delay = list(delay_incubation, delay_onset_to_report)1120)1121 1122# Simulating noisy delayed observations, assuming a gaussian noise 1123delayed_observations_3 <- simulate_delayed_observations(1124  infections,1125  delay = delay,1126  noise = list(type = 'gaussian', sd = 0.8)1127)","R"
1128"Nowcasting","covid-19-Re/estimateR","man/examples/get_infections_from_incidence.R",".R","1155","33","## Basic usage of get_infections_from_incidence1129# Recovering infection events from case incidence data assuming distinct gamma1130# distributions for the delay between infection and symptom onset, and the delay1131# between symptom onset and case reporting.1132 1133shape_incubation = 3.21134scale_incubation = 1.31135delay_incubation <- list(name=""gamma"", shape = shape_incubation, scale = scale_incubation)1136 1137shape_onset_to_report = 2.71138scale_onset_to_report = 1.61139delay_onset_to_report <- list(name=""gamma"",1140                              shape = shape_onset_to_report,1141                              scale = scale_onset_to_report)1142 1143infections_1 <- get_infections_from_incidence(1144  HK_incidence_data$case_incidence,1145  delay = list(delay_incubation, delay_onset_to_report)1146)1147 1148 1149## Advanced usage of get_infections_from_incidence1150# Recovering infection events from symptom onset data, assuming the same delay1151# distributions as above1152 1153infections_2 <- get_infections_from_incidence(1154  HK_incidence_data$onset_incidence,1155  delay = delay_incubation,1156  is_partially_reported_data = TRUE,1157  delay_until_final_report = delay_onset_to_report,1158  ref_date = HK_incidence_data$date[1]1159)1160","R"
1161"Nowcasting","covid-19-Re/estimateR","man/examples/nowcast.R",".R","900","27","## Basic usage of nowcast1162 1163shape_onset_to_report = 2.71164scale_onset_to_report = 1.61165delay_onset_to_report <- list(name=""gamma"",1166                              shape = shape_onset_to_report,1167                              scale = scale_onset_to_report)1168 1169corrected_incidence_data_1 <- nowcast(1170  incidence_data = HK_incidence_data$onset_incidence,1171  delay_until_final_report = delay_onset_to_report1172)1173 1174 1175## Advanced usage of nowcast1176# Only taking into account cases that have a chance of being observed greater1177# than 25%. Here, the delay between symptom onset and report is given as1178# empirical delay data, hence it is needed to specify the date of the first1179# entry in incidence_data1180 1181corrected_incidence_data_2 <- nowcast(1182  incidence_data = HK_incidence_data$onset_incidence,1183  delay_until_final_report = HK_delay_data,1184  ref_date = HK_incidence_data$date[1],1185  cutoff_observation_probability = 0.251186)1187","R"
1188"Nowcasting","covid-19-Re/estimateR","man/examples/estimate_Re.R",".R","2239","64","## Building incidence_data1189# estimate_Re assumes incidence_data represents infections, not delayed noisy1190# observations of infections. Thus, we need to first smooth the incidence data1191# and then perform a deconvolution step. For more details, see the smooth_incidence1192# and deconvolve_incidence functions.1193 1194shape_incubation <- 3.21195scale_incubation <- 1.31196delay_incubation <- list(name = ""gamma"", shape = shape_incubation, scale = scale_incubation)1197 1198shape_onset_to_report = 2.71199scale_onset_to_report = 1.61200delay_onset_to_report <- list(name=""gamma"",

Showing the first 1,200 of 18187 lines. Download the file for the rest.