Description Usage Arguments Value Examples
Fit a linear regression model where the covariate value in specific quarter is the covariate that explains all quarters of catch in a specific year. A 'year' for sardine starts in Q3 and goes to Q2 of the next year. The effect of a covariate can be specified to be quarter specific, that is catch in Q1 may respond differently to the covariate than catch in Q4. Note: this is an outdated function not used once I switched to GAMs.
1 2 3 4 5 6 7 8 | retfit.qtr(
covname,
catch.qtr = 1:4,
yearlag = 0,
cov.qtr = 1,
boxes = 1:14,
qtr.effect = FALSE
)
|
covname |
name of the covariate. Must be a colname in seio_covariates_qtr. If one of the covariates is from the boxes, then specify the part of the name in front of the number. |
catch.qtr |
what quarter(s) of catch to use as the response |
yearlag |
If 0, it means covariate in current year, where a sardine year starts in Q3. |
cov.qtr |
the quarter to use for the covariate. |
boxes |
for covariate from a box, the box number or numbers to use |
qtr.effect |
whether to make the covariate effect on catch depend on the quarter in which the catch is from |
An lm object of the fit
1 2 | #Effect of precip in box 5 in qtr 1 in the previous year on catch
retfit.qtr("Precip", yearlag=1, cov.qtr=1, boxes=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.