<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Welcome on Models for missing data</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/</link><description>Recent content in Welcome on Models for missing data</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Conditions</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/conditions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/conditions/</guid><description>&lt;h1 id="conditions"&gt;
 Conditions
 &lt;a class="anchor" href="#conditions"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Modify the default behavior of &lt;code&gt;pred&lt;/code&gt;-type means.&lt;/p&gt;
&lt;h2 id="syntax"&gt;
 Syntax
 &lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;trend conditions&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;Botanist&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;JA&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="usage"&gt;
 Usage
 &lt;a class="anchor" href="#usage"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;See the &lt;a href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/c-outputs/object-types/"&gt;object types&lt;/a&gt; entry for a more thorough introduction to this topic.&lt;/p&gt;</description></item><item><title>Installation</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/installation/</guid><description>&lt;h1 id="installation"&gt;
 Installation
 &lt;a class="anchor" href="#installation"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;h2 id="obtaining-a-copy-of-the-repository"&gt;
 Obtaining a copy of the repository
 &lt;a class="anchor" href="#obtaining-a-copy-of-the-repository"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 id="new-here"&gt;
 New here?
 &lt;a class="anchor" href="#new-here"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;To clone the repository, open a terminal&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; and run the following command &lt;em&gt;from&lt;/em&gt; the directory into which you&amp;rsquo;d like to place the project (e.g., from &lt;code&gt;~/repos&lt;/code&gt;).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git clone https://github.com/lzachmann/models-for-missing-data.git &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DIRNAME&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;DIRNAME&lt;/code&gt; is optional, and specifies the name of the directory into which the project will be cloned on your local machine. You could call it &amp;ldquo;m4md&amp;rdquo; for instance, if you wanted something a bit shorter than the default &amp;ldquo;models-for-missing-data.&amp;rdquo;&lt;/p&gt;</description></item><item><title>Likelihood function</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/likelihood-function/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/likelihood-function/</guid><description>&lt;h1 id="likelihood-function"&gt;
 Likelihood function
 &lt;a class="anchor" href="#likelihood-function"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The likelihood statement specifies the probability distribution that will be used to describe the response variable. The available options depend on your data, so knowing what &lt;a href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/a-data/iii-types-of-random-variables/"&gt;type of variable&lt;/a&gt; you&amp;rsquo;re working with is essential.&lt;/p&gt;
&lt;h2 id="syntax"&gt;
 Syntax
 &lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Likelihood. For counts, one or both of: poisson, negative-binomial.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;likelihood&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;poisson&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;negative-binomial&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="usage"&gt;
 Usage
 &lt;a class="anchor" href="#usage"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In some cases &amp;ndash; a model for soil stability observations &amp;ndash; there is only one plausible, implemented likelihood function (&lt;code&gt;ordinal-latent-normal&lt;/code&gt;). In other cases &amp;ndash; species richness &amp;ndash; there might be several available options (&lt;code&gt;poisson&lt;/code&gt;, &lt;code&gt;negative-binomial&lt;/code&gt;, and their zero-inflated counterparts). In cases where you specify multiple likelihoods, the model API will create a separate analysis for each, and the relative performance of each can be evaluated using model diagnostics, posterior predictive checks, and information criteria.&lt;/p&gt;</description></item><item><title>Mock data walkthrough</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/5-forecasting/running/guides/mock-data/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/5-forecasting/running/guides/mock-data/</guid><description>&lt;h1 id="your-first-forecast-mock-data"&gt;
 Your First Forecast (Mock Data)
 &lt;a class="anchor" href="#your-first-forecast-mock-data"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;This is the simpliest path to perform a forecast. All data is pre-committed, so there&amp;rsquo;s nothing to download or prepare. The walkthrough has three steps.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;
 Prerequisites
 &lt;a class="anchor" href="#prerequisites"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;A working M4MD repo. [TODO: formalize this]&lt;/p&gt;
&lt;h2 id="step-0-understand-the-mock-data"&gt;
 Step 0: Understand the mock data
 &lt;a class="anchor" href="#step-0-understand-the-mock-data"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The mock dataset represents a single park unit (&lt;strong&gt;ELDO&lt;/strong&gt;) with two vegetation strata (&lt;strong&gt;A&lt;/strong&gt; and &lt;strong&gt;B&lt;/strong&gt;), three sites per stratum, and three transects per site — surveyed annually from &lt;strong&gt;2000 to 2025&lt;/strong&gt;. Each transect records how many of 100 sample points hit a plant (&lt;code&gt;y_hits&lt;/code&gt; out of &lt;code&gt;n_points = 100&lt;/code&gt;). A single climate covariate, &lt;strong&gt;precipitation (ppt)&lt;/strong&gt;, declines gradually over the training period and drives the vegetation response.&lt;/p&gt;</description></item><item><title>Model builder</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/4-internals/model-builder/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/4-internals/model-builder/</guid><description>&lt;h1 id="model-builder"&gt;
 Model builder
 &lt;a class="anchor" href="#model-builder"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The shell script &lt;code&gt;compile-jags-file.sh&lt;/code&gt; builds JAGS model files using several
arguments. The arguments &amp;ndash; which correspond to the likelihood, the
deterministic function, group-level effects parameterization (random intercepts
and slopes vs. random intercepts only), the presence or absence of additional
covariates and, finally, the path to write to &amp;ndash; are supplied via the
&amp;lsquo;MODEL&amp;rsquo; block in the YAML file for an analysis. For purposes of development or
debugging, &lt;code&gt;compile-jags-file.sh&lt;/code&gt; can be sourced from the command line with an
optional output directory as such:&lt;/p&gt;</description></item><item><title>Non-ignorable missingness</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/non-ignorable-missingness/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/non-ignorable-missingness/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Statistics is basically a missing data problem!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;ndash; Little 2013&lt;/p&gt;
&lt;p&gt;Nearly all samples &amp;ndash; whether by design or by accident &amp;ndash; are incomplete. We very rarely make a complete census of all individuals in a population or all sites on a landscape. Sometimes we don&amp;rsquo;t collect, or can&amp;rsquo;t collect, complete information for individual samples or measures. For instance, we might know an animal was alive when it was last seen, so we know it survived &lt;em&gt;at least&lt;/em&gt; that long, but know nothing about its current status. Or we might have information on the coverage of an invasive species down to a certain patch size, beyond which patches are too small or numerous to survey.&lt;/p&gt;</description></item><item><title>Response data</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/a-data/i-y-info/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/a-data/i-y-info/</guid><description>&lt;h1 id="response-data"&gt;
 Response data
 &lt;a class="anchor" href="#response-data"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The response data include the observations we are trying to model, as well as columns with identifiers (indices, IDs, datetime strings) for all relevant sampling design information. Elements of the sampling design often seen in long-term monitoring data include the following:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th style="text-align: left"&gt;Design element&lt;/th&gt;
 &lt;th style="text-align: left"&gt;Examples&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;observational units&lt;/td&gt;
 &lt;td style="text-align: left"&gt;transect, quadrat, plot&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;sampling units&lt;/td&gt;
 &lt;td style="text-align: left"&gt;plot, site&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;stratification&lt;/td&gt;
 &lt;td style="text-align: left"&gt;stratum&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td style="text-align: left"&gt;date / event times&lt;/td&gt;
 &lt;td style="text-align: left"&gt;&lt;code&gt;MM/DD/YYYY&lt;/code&gt;, &lt;code&gt;YYYY&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="format"&gt;
 Format
 &lt;a class="anchor" href="#format"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The response data are stored as flat files. The key characteristic of a flat file is that each row represents a single observation, while the columns describe values associated with the observation and the design features described above. These files are typically text files with no special word processing or markup. The file can be CSV, XLS, XLSX, GZ, or RDS. For ease of use, readability, and other reasons, we generally recommend CSV.&lt;/p&gt;</description></item><item><title>Response info</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/ii-analysis-data/response-info/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/ii-analysis-data/response-info/</guid><description>&lt;h1 id="response-information"&gt;
 Response information
 &lt;a class="anchor" href="#response-information"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;h2 id="the-usual-case"&gt;
 The usual case
 &lt;a class="anchor" href="#the-usual-case"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;In the usual case, we are working with a single vector of observations (a single column of data in a flat file). Below, we see the first few lines of the data block for an analysis of count-type data from Little Bighorn Battlefield National Monument (LIBI), in Montana (a park within the Rocky Mountain Network). The file, &lt;code&gt;rich.yml&lt;/code&gt;, lives in the directory &lt;code&gt;assets/uplands-config/ROMN/LIBI&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Climate futures tutorial</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/5-forecasting/running/guides/climate-futures-data/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/5-forecasting/running/guides/climate-futures-data/</guid><description>&lt;h1 id="forecasting-with-real-world-data"&gt;
 Forecasting with Real-World Data
 &lt;a class="anchor" href="#forecasting-with-real-world-data"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;!-- TODO: Intro paragraph — this path is for users who have their own NPS
 monitoring data and want to run a real forecast. It has a moderate lift:
 the user provides a response variable CSV, and an external notebooks repo
 handles covariate and scenario data preparation.
--&gt;
&lt;h2 id="what-youll-need"&gt;
 What You&amp;rsquo;ll Need
 &lt;a class="anchor" href="#what-youll-need"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;!-- TODO: Checklist — same R/JAGS prereqs as mock walkthrough, plus:
 - your own response variable CSV (format TBD — link to column schema)
 - access to the external notebooks repo (link TBD)
--&gt;
&lt;h2 id="step-1-prepare-your-covariate-and-scenario-data"&gt;
 Step 1: Prepare Your Covariate and Scenario Data
 &lt;a class="anchor" href="#step-1-prepare-your-covariate-and-scenario-data"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;!-- TODO: Point to the external notebooks repo (URL TBD). Explain:
 - User provides their response variable CSV
 - The notebooks produce a formatted covariates CSV and a scenarios CSV
 - The output format matches what analysis-pipeline.R and
 forecast-pipeline.R expect
--&gt;
&lt;h2 id="step-2-fit-the-model"&gt;
 Step 2: Fit the Model
 &lt;a class="anchor" href="#step-2-fit-the-model"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Once your data files are ready, follow the same fit step as the mock walkthrough:&lt;/p&gt;</description></item><item><title>Covariate data</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/a-data/ii-x-info/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/a-data/ii-x-info/</guid><description>&lt;h1 id="covariate-data"&gt;
 Covariate data
 &lt;a class="anchor" href="#covariate-data"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Covariates are variables that are expected to change with the response variable &amp;ndash; they &lt;em&gt;covary&lt;/em&gt; in some way with the observations we seek to model. The definition of covariates varies widely online and in the literature. For our purposes, we use the term &lt;em&gt;covariate&lt;/em&gt; to describe any variable (whether continuous or discrete) that might influence the mean of the response variable we are interested in. In many cases their effects are of direct interest in the analysis (weather or terrain, for instance). In other cases, a covariate might be &amp;ldquo;nuisance variable&amp;rdquo; &amp;ndash; a fact or feature that is of no particular interest in itself, but nonetheless might be necessary to build a proper model and develop robust inference. Examples of nuisances include sudden changes in protocol or observers.&lt;/p&gt;</description></item><item><title>Disentangling concepts of status, trend, and trajectory</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/trend-vs-trajectory/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/trend-vs-trajectory/</guid><description>&lt;p&gt;The terms status and trend are ubiquitous in resource monitoring and management settings. To be useful and robust, however, they require precise (mathematical) definitions. It has been my experience that misunderstanding these terms can lead to misapplication of model predictions and to researchers and managers drawing the wrong conclusions from the data. In this post we show how relatively simple, even intuitive, definitions for each of these terms clarifies their intent, and improves the insights provided by models of monitoring data.&lt;/p&gt;</description></item><item><title>Finite population correction</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/finite-pop/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/finite-pop/</guid><description>&lt;h1 id="finite-population-correction"&gt;
 Finite population correction
 &lt;a class="anchor" href="#finite-population-correction"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;When the size of the sample collected is a significant proportion of the overall population, then we must use a finite population correction, a topic we introduce briefly in &lt;a href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/sampling-and-populations/"&gt;another post&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="syntax"&gt;
 Syntax
 &lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;finite population correction&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;finite population info&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;file&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;assets/uplands-data/ROMN/LIBI_SampledUnsampled_Ratio.csv&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;columns with the number of sampled and unsampled sites&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#e6db74"&gt;&amp;#39;# sampled sites&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#e6db74"&gt;&amp;#39;# unsampled sites&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;covariate info includes unsampled sites&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="usage"&gt;
 Usage
 &lt;a class="anchor" href="#usage"&gt;#&lt;/a&gt;
&lt;/h2&gt;</description></item><item><title>Link function</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/link-function/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/link-function/</guid><description>&lt;h1 id="link-function"&gt;
 Link function
 &lt;a class="anchor" href="#link-function"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The deterministic link function for the regression on the mean ensures that the mean we are trying to model has the appropriate support for the probability distribution from which our observations arise.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;deterministic model&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;linear&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;exponential&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Location info</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/ii-analysis-data/site-loc-info/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/ii-analysis-data/site-loc-info/</guid><description>&lt;h1 id="location-info"&gt;
 Location info
 &lt;a class="anchor" href="#location-info"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Site location information (&lt;code&gt;site location info&lt;/code&gt;), if provided, is used to evaluate spatial autocorrelation in model residuals.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;site location info&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;file&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;assets/uplands-data/ROMN/LIBI_GRKO_metrics_adjwt_20170414_forCSP.csv&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;coordinate columns&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;xcoord&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;ycoord&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here again, we point to the name of the file (&lt;code&gt;file&lt;/code&gt;) and supply the names of the columns containing the spatial coordinates (&lt;code&gt;coordinate columns&lt;/code&gt;). Note that proper residual analysis requires Cartesian coordinates. If the locations come directly from a geographic coordinate system, they&amp;rsquo;ll need to be transformed to a projected coordinate system.&lt;/p&gt;</description></item><item><title>Requirements</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/requirements/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/requirements/</guid><description>&lt;h1 id="requirements"&gt;
 Requirements
 &lt;a class="anchor" href="#requirements"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The requirements include R (v4.X.X) and RStudio (if you&amp;rsquo;d like to work with &lt;strong&gt;models-for-missing-data&lt;/strong&gt; interactively), and JAGS (v4.3.0). Git and Git Bash (for Windows users) are convenient if you&amp;rsquo;d like to stay up to date with the latest changes.&lt;/p&gt;
&lt;p&gt;The requirements (including a few non-essentials) are described in the latest Dockerfile. You&amp;rsquo;re likely to need everything you see beneath &lt;code&gt;install2.r&lt;/code&gt; in the instructions below. You can install these from your R console with &lt;code&gt;install.packages()&lt;/code&gt;.


&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;FROM&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;rocker&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;geospatial&lt;/span&gt;:&lt;span style="color:#ae81ff"&gt;4.1.2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;#&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Copy&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Latin&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Modern&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;font&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;files&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;to&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;fonts&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;directory&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;and&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;refresh&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;fonts&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;cache&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;COPY&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Latin&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Modern&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Roman&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;fontfacekit&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;zip&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;tmp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;RUN&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;unzip&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;tmp&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Latin&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Modern&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Roman&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;fontfacekit&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;zip&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;d&lt;/span&gt; &lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;usr&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;share&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;fonts&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;fc&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;cache&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;f&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;v&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;rm&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;tmp&lt;/span&gt;&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Latin&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Modern&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;Roman&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;fontfacekit&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;zip&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;#&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Install&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;JAGS&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;RUN&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;apt&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;get&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;update&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;y&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;apt&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;get&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;install&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;y&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;jags&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;#&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Graphics&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;and&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;other&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;required&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;packages&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;RUN&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;apt&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;get&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;install&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;tree&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;Rscript&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;e&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;update.packages(ask = FALSE)&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;install2&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;r&lt;/span&gt; &lt;span style="color:#f92672"&gt;--&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;error&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;abind&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;spsurvey&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;hrbrthemes&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;ggthemes&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;ggridges&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;cowplot&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;HDInterval&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;rjags&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;coda&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;R2jags&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;runjags&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;bayesplot&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;extraDistr&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;MCMCpack&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;magick&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;gifski&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;gganimate&lt;/span&gt; &lt;span style="color:#960050;background-color:#1e0010"&gt;\&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;multidplyr&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</description></item><item><title>Covariate info</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/ii-analysis-data/covariate-info/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/ii-analysis-data/covariate-info/</guid><description>&lt;h1 id="covariate-info"&gt;
 Covariate info
 &lt;a class="anchor" href="#covariate-info"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Covariate information (&lt;code&gt;covariate info&lt;/code&gt;), if provided, is joined to the response information prior to model fitting. It&amp;rsquo;s used only in models for which predictors are specified.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;covariate info&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;file&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;assets/uplands-data/ROMN/LIBI_Covariates_AllSitesAllYears_20201104_Through2016_with_exotics.csv&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;event date info&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;date-time column&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;Year&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;date-time format&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;Y&lt;/span&gt;!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As with the other statements in the data block, we point to the name of the covariate file (&lt;code&gt;file&lt;/code&gt;; see the &lt;a href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/a-data/ii-x-info/"&gt;covariate data&lt;/a&gt; section for more detail) and, if different from the date attributes in the response data, supply info required to properly parse covariate datetime fields.&lt;/p&gt;</description></item><item><title>Custom data guide</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/5-forecasting/running/guides/custom-data/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/5-forecasting/running/guides/custom-data/</guid><description>&lt;h1 id="running-a-forecast-with-custom-data"&gt;
 Running a Forecast with Custom Data
 &lt;a class="anchor" href="#running-a-forecast-with-custom-data"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;!-- TODO: Intro paragraph — this is the full reference for users bringing
 entirely their own data (response, covariates, and scenarios). No
 external tool required. This page is denser than the walkthroughs
 and serves as a reference rather than a tutorial.
--&gt;
&lt;h2 id="required-input-files"&gt;
 Required Input Files
 &lt;a class="anchor" href="#required-input-files"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;!-- TODO: Describe each input file with column schemas:
 1. Response variable CSV — columns, units, required fields
 2. Covariates CSV (training) — columns, format
 3. Scenarios CSV (future) — columns, scenario_id vs model_run_id distinction,
 how multiple GCM runs are represented
 Cross-reference forecasting/getting-started/generate-mock-data.R
 for concrete examples of each format.
--&gt;
&lt;h2 id="forecast-config-yaml-reference"&gt;
 Forecast Config YAML Reference
 &lt;a class="anchor" href="#forecast-config-yaml-reference"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;!-- TODO: Document every key in the forecast config YAML:
 - Required keys (paths to inputs, output dir, likelihood)
 - Covariate strategy options: provided / hold_last / hold_mean
 - Scenario filtering options
 - n_cores, seed, etc.
 Source: forecasting/forecast/read-forecast-config.R
--&gt;
&lt;h2 id="running-the-pipeline"&gt;
 Running the Pipeline
 &lt;a class="anchor" href="#running-the-pipeline"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Rscript forecasting/forecast/forecast-pipeline.R &lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --config path/to/forecast-config.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!-- TODO: Note any useful flags (--dry-run, --verbose, etc. if they exist).
 Describe what a successful run looks like in the console. --&gt;
&lt;h2 id="output-files"&gt;
 Output Files
 &lt;a class="anchor" href="#output-files"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;!-- TODO: Document the output directory layout and key files:
 - Trajectory plots (per-site, per-stratum)
 - Spaghetti plots
 - forecast-site-summaries.csv — describe each column
 - mu_median vs y_rep_median — explain the distinction in plain English
 Source: forecasting/forecast/forecast-plot-engine.R
--&gt;</description></item><item><title>Group-level effects</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/group-level-effects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/group-level-effects/</guid><description>&lt;h1 id="group-level-effects"&gt;
 Group-level effects
 &lt;a class="anchor" href="#group-level-effects"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The basic motivation for random group-level effects is that sites matter. They are an essential feature of the sampling design. Having no such random effects would imply that sites don&amp;rsquo;t matter and observations can be pooled (as if they were collected from a completely random sample).&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Group-level effects incorporate differences among sites (that may be impossible to model with covariates) to inform park-level trends. They allow each site to have its intercept (and potentially, its slope) drawn from a common / underlying distribution of intercepts (and slopes). We make inference at the park scale using the parameters of the distribution from which the individual site intercepts and slopes are drawn.&lt;/p&gt;</description></item><item><title>Marginal effects</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/marginal-effects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/marginal-effects/</guid><description>&lt;h1 id="marginal-effects"&gt;
 Marginal effects
 &lt;a class="anchor" href="#marginal-effects"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Summaries of the association between a change in a regressor and a change in the response variable.&lt;/p&gt;
&lt;h2 id="syntax"&gt;
 Syntax
 &lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;drivers&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="usage"&gt;
 Usage
 &lt;a class="anchor" href="#usage"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;When &lt;code&gt;drivers: true&lt;/code&gt;, the model API creates additional JAGS objects, which are used to evaluate the marginal effects of explanatory variables in the model. By default, it shows the effect of each variable over its empirical range, holding all other variables at zero (the mean of scaled continuous variables or the reference level of categorical variables).&lt;/p&gt;</description></item><item><title>Quickstart</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/quickstart/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/quickstart/</guid><description>&lt;h1 id="quickstart"&gt;
 Quickstart
 &lt;a class="anchor" href="#quickstart"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Assuming you&amp;rsquo;ve got the &lt;strong&gt;models-for-missing-data&lt;/strong&gt; project code (see &lt;a href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/installation/"&gt;Installation&lt;/a&gt;) and have all of the dependencies (see &lt;a href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/requirements/"&gt;Requirements&lt;/a&gt;), the last remaining pieces you&amp;rsquo;ll need to begin running models are the data and analysis config files. We&amp;rsquo;ve included examples of each in the &amp;ldquo;assets/&amp;rdquo; directory. See the guide for more information about each of these components of the &lt;strong&gt;models-for-missing-data&lt;/strong&gt; workflow. You can find an example of the data &lt;a href="https://raw.githubusercontent.com/lzachmann/models-for-missing-data/main/assets/_data/count-data.csv"&gt;here&lt;/a&gt;, and an analysis config file for these data &lt;a href="https://raw.githubusercontent.com/lzachmann/models-for-missing-data/main/assets/_config/M4MD/ELDO/counts.yml"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Unequal inclusion probabilities</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/unequal-inclusion-probability/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/unequal-inclusion-probability/</guid><description>&lt;p&gt;The Sonoran Desert is among the most extreme environments on Earth. Sampling in these remote, rugged landscapes requires a different approach. When the Park Service established monitoring in Organ Pipe Cactus National Monument they used an approach to select sites based on the cost of travel to sites on the broader landscape, visiting less &amp;ldquo;costly&amp;rdquo; sites with higher probability than more costly sites. The cost surface that defined the probability of inclusion of sites was developed using terrain data, and a tool that estimates the time to travel to any arbitrary location on the landscape.&lt;/p&gt;</description></item><item><title>Posterior predictive checks</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/ppc-facets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/ppc-facets/</guid><description>&lt;h1 id="posterior-predictive-checks"&gt;
 Posterior predictive checks
 &lt;a class="anchor" href="#posterior-predictive-checks"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;By default, the posterior predictive checks produced by the model API include &lt;code&gt;stratum_id&lt;/code&gt; and &lt;code&gt;unit_code&lt;/code&gt;. We include these elements by default because they correspond directly to subscripts in the model. You can specify additional variables for post-hoc model checking via &lt;code&gt;ppc facets&lt;/code&gt;.
Performing posterios predictive checks is an essential step in modeling process. These checks essentially allow you to evaluate whether your model
can generate new data that are similar to your observed data. The posterior predictive check process involves generating many new data sets from
your model from what is called the posterior predictive distribution, and comparing charateristics (e.g. the mean and/or variance of the data set)
of those simulated data sets those same characteristics of data used for model fitting. If you have a very good model that fits your data well,
then in the case of the mean, you should expect the true mean of your data set to fall right around the 50th percentile of the distribution of
means from the simulated datasets (the same goes for variance or other quantites). A posterior predictive check identifies this quantile (which
is often referred to as a Bayesian p value). A Bayesian p value that is very close to 0 or 1 (a rule of thumb that is often used is greater than
0.8 or less than 0.2) may suggest a poor model fit.&lt;/p&gt;</description></item><item><title>Sampling and populations</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/sampling-and-populations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/sampling-and-populations/</guid><description>&lt;p&gt;We sample for a very practical reason. It&amp;rsquo;s usually impossible to get information on the whole population, so we use a sample to make inferences about the population. In our case, the population is typically all sites in a stratum or all sites &amp;ndash; in all strata &amp;ndash; at the scale of an entire park. Typically, the inference we seek entails three questions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What&amp;rsquo;s the best estimate of the population mean?&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;We can generate a sample mean, 
&lt;link rel="stylesheet" href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/katex.min.css" /&gt;
&lt;script defer src="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/katex.min.js"&gt;&lt;/script&gt;
&lt;script defer src="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/auto-render.min.js" onload="renderMathInElement(document.body);"&gt;&lt;/script&gt;&lt;span&gt;
 \(\bar{x}\)
&lt;/span&gt;
, from our sample. This is the best estimate of the population mean.&lt;/p&gt;</description></item><item><title>Sync changes</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/sync-changes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/0-getting-started/sync-changes/</guid><description>&lt;h1 id="sync-changes"&gt;
 Sync changes
 &lt;a class="anchor" href="#sync-changes"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;h2 id="checking-for-updates"&gt;
 Checking for updates
 &lt;a class="anchor" href="#checking-for-updates"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;h3 id="project-updates"&gt;
 Project updates
 &lt;a class="anchor" href="#project-updates"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;To get the latest &lt;strong&gt;models-for-missing-data&lt;/strong&gt; code, navigate to your project directory using a terminal, and run &lt;code&gt;git pull&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="submodule-updates--individual-submodules"&gt;
 Submodule updates / individual submodules
 &lt;a class="anchor" href="#submodule-updates--individual-submodules"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd &amp;lt;submodule path&amp;gt; &lt;span style="color:#75715e"&gt;# e.g., model-api&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git fetch
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git checkout gh-submodule
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git pull origin gh-submodule
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="submodule-updates--all-submodules-simultaneously"&gt;
 Submodule updates / all submodules simultaneously
 &lt;a class="anchor" href="#submodule-updates--all-submodules-simultaneously"&gt;#&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;First, be sure to do any necessary housekeeping (remove, stash, or commit changes). To get the latest updates for each of the submodules, run:&lt;/p&gt;</description></item><item><title>Variances</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/variances/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/variances/</guid><description>&lt;h1 id="variances"&gt;
 Variances
 &lt;a class="anchor" href="#variances"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;As with group-level effects for the intercept or time slope terms, each site can also have its own variance.&lt;/p&gt;
&lt;h2 id="syntax"&gt;
 Syntax
 &lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;variances&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;stratum-level fixed&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;level&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;stratum&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;type&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;fixed&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;response column(s)&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;native.rich&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;native.forb.rich&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;site-level hierarchical&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;level&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;site&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;type&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;hier&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;response column(s)&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;native.rich&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;native.forb.rich&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="usage"&gt;
 Usage
 &lt;a class="anchor" href="#usage"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;The entries beneath &lt;code&gt;response column(s)&lt;/code&gt; &lt;em&gt;have&lt;/em&gt; to be column names, not variable descriptions. The model API will create all combinations of models specified in these blocks. Thus, in the example above, we would obtain four distinct models.&lt;/p&gt;</description></item><item><title>Covariates</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/covariates/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/covariates/</guid><description>&lt;h1 id="covariates"&gt;
 Covariates
 &lt;a class="anchor" href="#covariates"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The predictors to use for modeling the mean of the response variable.&lt;/p&gt;
&lt;h2 id="syntax"&gt;
 Syntax
 &lt;a class="anchor" href="#syntax"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yml" data-lang="yml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;additional covariates&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;Botanist (JA)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ae81ff"&gt;Botanist (JA), deficit.pregr&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="usage"&gt;
 Usage
 &lt;a class="anchor" href="#usage"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;For categorical variables (e.g., &lt;code&gt;Botanist&lt;/code&gt;), the optional parenthetical declaration can do one of two things.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It sets the reference level for dummy-coded variables. In the case of &lt;code&gt;Botanist (JA)&lt;/code&gt;, the reference level becomes the botanist with initials &lt;code&gt;JA&lt;/code&gt;. If not specified, the reference level will be set using R&amp;rsquo;s default handling for factors (using the first level of the factor sorted in ascending alphabetical o.rder as the reference level)&lt;/li&gt;
&lt;li&gt;It can also be used to implement sum-to-zero effect coding, which we call deflections. For instance &lt;code&gt;MgmtZone (deflections)&lt;/code&gt;. In the case of deflections, the coefficients for each level of the categorical variable sum to zero. By default the model returns only the first 
&lt;link rel="stylesheet" href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/katex.min.css" /&gt;
&lt;script defer src="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/katex.min.js"&gt;&lt;/script&gt;
&lt;script defer src="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/auto-render.min.js" onload="renderMathInElement(document.body);"&gt;&lt;/script&gt;&lt;span&gt;
 \(k-1\)
&lt;/span&gt;
 coefficients, but the &lt;span&gt;
 \(k^{\mathrm{th}}\)
&lt;/span&gt;
 coefficient can be computed as a derived quantity. See &lt;a href="https://stats.stackexchange.com/a/163148"&gt;this StackExchange post&lt;/a&gt; for more on this calculation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;See &lt;a href="https://stats.oarc.ucla.edu/spss/faq/coding-systems-for-categorical-variables-in-regression-analysis"&gt;this resource&lt;/a&gt; for additional background on dummy vs effect coding.&lt;/p&gt;</description></item><item><title>Exposure / offset</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/exposure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iv-analysis-extras/exposure/</guid><description>&lt;h1 id="exposure--offset"&gt;
 Exposure / offset
 &lt;a class="anchor" href="#exposure--offset"&gt;#&lt;/a&gt;
&lt;/h1&gt;</description></item><item><title>Initial values</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/inits/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/docs/1-guide/b-config-files/iii-analysis-model/inits/</guid><description>&lt;h1 id="initial-values"&gt;
 Initial values
 &lt;a class="anchor" href="#initial-values"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Initial values determine the starting point of the sampler, and can play a large role in ensuring efficient sampling and convergence. Implementing some degree of randomness is also important when defining initial values to ensure that a model is able to converge properly for a range of initial values. Providing initial values that are within or near the posterior distribution of the parameter of interest serves not only to speed up convergence, but also to optimize the efficiency of the sampler (i.e. make it more random and less autocorrelated) in cases when the sampling algorithm is doing hyperparameter tuning during the early phases of sampling.&lt;/p&gt;</description></item><item><title>Interpreting coefficients</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/interpreting-coefficients/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/interpreting-coefficients/</guid><description>&lt;h2 id="making-sense-of-the-effects-of-variables-included-as-predictors"&gt;
 Making sense of the effects of variables included as predictors
 &lt;a class="anchor" href="#making-sense-of-the-effects-of-variables-included-as-predictors"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Some aspects of covariate effects are readily apparent &amp;ndash; for instance, the sign of a coefficient in a model says at least something about the general directionality of the effect, positive or negative. However, a deeper understanding of a model typically requires inferences that go well beyond simple measures of the &lt;em&gt;directionality&lt;/em&gt; or &lt;em&gt;significance&lt;/em&gt; of effects &amp;ndash; it requires understanding the &lt;em&gt;size&lt;/em&gt; of effects.&lt;/p&gt;</description></item><item><title>Stratum-varying fixed effects</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/stratum-varying-fixed-effects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/stratum-varying-fixed-effects/</guid><description>&lt;p&gt;Assume we have three strata, 
&lt;link rel="stylesheet" href="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/katex.min.css" /&gt;
&lt;script defer src="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/katex.min.js"&gt;&lt;/script&gt;
&lt;script defer src="https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/katex/auto-render.min.js" onload="renderMathInElement(document.body);"&gt;&lt;/script&gt;&lt;span&gt;
 \(s_0\)
&lt;/span&gt;
, &lt;span&gt;
 \(s_1\)
&lt;/span&gt;
, and &lt;span&gt;
 \(s_2\)
&lt;/span&gt;
, where &lt;span&gt;
 \(s_0\)
&lt;/span&gt;
 is the &amp;ldquo;reference&amp;rdquo; stratum – in other words, &lt;span&gt;
 \(s_0\)
&lt;/span&gt;
 is the stratum for which the 0/1 indicator is 0 across the board in the indicator matrix below (the first row):&lt;/p&gt;
&lt;span&gt;
 \[\begin{bmatrix}
1 &amp;amp; 0 &amp;amp; 0 \\
1 &amp;amp; 1 &amp;amp; 0 \\
1 &amp;amp; 0 &amp;amp; 1
\end{bmatrix}\]
&lt;/span&gt;

&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-R" data-lang="R"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;B_0 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; (B_1 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; B_1_s1_offset &lt;span style="color:#f92672"&gt;*&lt;/span&gt; s1 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; B_1_s2_offset &lt;span style="color:#f92672"&gt;*&lt;/span&gt; s2) &lt;span style="color:#f92672"&gt;*&lt;/span&gt; x_1 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# in stratum s0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;B_0 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; (B_1) &lt;span style="color:#f92672"&gt;*&lt;/span&gt; x_1 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# in stratum s1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;B_0 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; (B_1 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; B_1_s1_offset &lt;span style="color:#f92672"&gt;*&lt;/span&gt; s1) &lt;span style="color:#f92672"&gt;*&lt;/span&gt; x_1 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# in stratum s2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;B_0 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; (B_1 &lt;span style="color:#f92672"&gt;+&lt;/span&gt; B_1_s2_offset &lt;span style="color:#f92672"&gt;*&lt;/span&gt; s2) &lt;span style="color:#f92672"&gt;*&lt;/span&gt; x_1 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# lm(y~x1*x2)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;model.matrix&lt;/span&gt;(&lt;span style="color:#f92672"&gt;~&lt;/span&gt;x1&lt;span style="color:#f92672"&gt;*&lt;/span&gt;x2, &lt;span style="color:#a6e22e"&gt;tibble&lt;/span&gt;(x1 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;runif&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;), x2 &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;runif&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;)))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>The offset term</title><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/offsets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/posts/offsets/</guid><description>&lt;p&gt;Counts of things naturally scale with the length or duration of observation, the area sampled, and sampling intensity 




&lt;span class="hugo-cite-intext"
 itemprop="citation"&gt;(&lt;span class="hugo-cite-group"&gt;

 &lt;a href="#mcelreath2018statistical"&gt;&lt;span class="visually-hidden"&gt;Citation: &lt;/span&gt;&lt;span itemprop="author" itemscope itemtype="https://schema.org/Person"&gt;&lt;meta itemprop="givenName" content="Richard"&gt;&lt;span itemprop="familyName"&gt;McElreath&lt;/span&gt;&lt;/span&gt;,&amp;#32;&lt;span itemprop="datePublished"&gt;2018&lt;/span&gt;&lt;/a&gt;&lt;span class="hugo-cite-citation"&gt; 










&lt;span itemscope 
 itemtype="https://schema.org/Book"
 data-type="book"&gt;&lt;span itemprop="author" itemscope itemtype="https://schema.org/Person"&gt;&lt;span itemprop="familyName"&gt;McElreath&lt;/span&gt;,&amp;#32;
 &lt;meta itemprop="givenName" content="Richard" /&gt;
 R.&lt;/span&gt;&amp;#32;
 (&lt;span itemprop="datePublished"&gt;2018&lt;/span&gt;).
 &amp;#32;&lt;span itemprop="name"&gt;
 &lt;i&gt;Statistical rethinking: A bayesian course with examples in r and stan&lt;/i&gt;&lt;/span&gt;.
 &amp;#32;
 &lt;span itemprop="publisher"
 itemtype="http://schema.org/Organization"
 itemscope=""&gt;
 &lt;span itemprop="name"&gt;Chapman; Hall/CRC&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt;




&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt;
. For instance, the longer the river stretch we survey, the more fish we&amp;rsquo;ll tend to find.&lt;/p&gt;
&lt;p&gt;Offset terms are used to model rates &amp;ndash; e.g., counts per unit area or time. In the context of the model, the offset term transforms the response variable from a rate to a count.&lt;/p&gt;</description></item><item><title/><link>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/menu/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mtaniguchiking.github.io/M4MD-forecast-docs-dev/menu/</guid><description/></item></channel></rss>