R/makedat.R
makedat.Rd
Creates a data frame for the demeaned LOG Kerala catch anomalies and standardized covariate anomolies. You can specify that covariate value is lagged by 'lag' quarters or use a specific quarter from a specific year as the covariate for all qtrs in a 'sardine year'. A sardine year starts in Q3 and goes to Q2 the next calendar year.
makedat( region = "Kerala", covname = "Precip", boxes = 1:14, rm.trend = TRUE, rm.season = TRUE, startyear = 1956, endyear = 2016, lag = 0, yearlag = 0, cov.qtr = 1:4 )
region | "Kerala", "Karnataka", "Goa" or "SWCoast" |
---|---|
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. |
boxes | for covariate from a box, the box number or numbers to use |
rm.trend | whether to detrend the catch and covariates |
rm.season | whether to deseason the catch and covariates |
startyear | first year |
endyear | last year |
lag | lag to use for the covariate. Do not set both this and yearlag. |
yearlag | If 0, it means covariate in year when sardine year starts; a sardine year starts in Q3. |
cov.qtr | the quarter to use for the covariate IF a specific quarter is wanted for the covariate. |
data frame