Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • C CPG tools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • CPG tools
  • Wiki
  • regression

regression · Changes

Page history
jvegas created page: regression authored Feb 24, 2017 by Javier Vegas-Regidor's avatar Javier Vegas-Regidor
Hide whitespace changes
Inline Side-by-side
regression.md 0 → 100644
View page @ b497c4af
# Objective
# Description
## List of functions
* regressedts.R
* multipleregress.R
* filteroutreg.R
* PoissonReg.R
* PoissonRegwTrend.R
### Extract a signal by linear regression over a range of lags
The script named regressedts.R and stored at https://dev.cfu.local/cfu_tools.git regression
extract from any 1d (time) to 3d
(time-lat-lon) field the effect of greenhouse gases, ENSO, or any mode of
variability through a multilinear regression over the corresponding index (greenhouse gas
concentration, ENSO index ..) at a set of lags you can choose.
### Extract a signal by a multilinear regression over a set of indices
The script named multipleregress.R and stored at https://dev.cfu.local/cfu_tools.git regression
extract from any 1d (time) to 3d
(time-lat-lon) field the combined effect of greenhouse gases, ENSO, and any mode of
variability through a multilinear regression over the corresponding indices (greenhouse gas
concentration, ENSO index ..).
### Filtering out a signal by a linear regression over a range of lags
The script named filteroutreg.R and stored at https://dev.cfu.local/cfu_tools.git regression
filters out from any 1d (time) to 3d
(time-lat-lon) field the effect of greenhouse gases, ENSO, or any mode of
variability through a multilinear regression over the corresponding index (greenhouse gas
concentration, ENSO index ..) at a set of lags you can choose.
### Compute Poisson Regressions
The function computes the Poisson regression of every timeseries in predictands.csv onto every single predictor in predictors.csv (it regresses 1 predictand onto 1 predictor). The input and output are csv format. Each column should be identified with text and the first column of all files has to be the same and must represent the time of measurements. You can find an example of input files in /home/lpcaron/git-stuff/cfutools/regression.
### Compute Poisson Regressions after accounting for a Trend
The function computes the Poisson regression of every timeseries in predictands.csv onto every single predictor in predictors.csv after removing the effect of every trend in trends.csv. The input and output are csv format. Each column should be identified with text and the first column of all files has to be the same and must represent the time of measurements. You can find an example of input files in /home/lpcaron/git-stuff/cfutools/regression.
# Use
## Extract a signal by linear regression over a range of lags
./regressedts.R filename varname fileindex varindex outputfile
set_of_lags
Ex :
./regressedts.R file_ERSST_tos_1960-2005.nc tos
CO2_concentration_MaunaLoa.nc c02 file_ERSST_tos_1960-2005_co2_contribution.nc 0 > tos_c02.out &
./regressedts.R file_ERSST_tos_1960-2005.nc tos ENSO_index.nc ENSO file_ERSST_tos_1960-2005_ENSO_contribution.nc -12 -6 0 6 12 > tos_enso.out &
You can try to use it with some index I have left in the directory :
CO2 concentration at Mauna Loa from Climate Explorer and ENSO/PDO/PNA
index from NOAA website together with the corresponding index smoothed out
with a 1yr running mean.
## Extract a signal by a multilinear regression over a set of indices ===
./multipleregress.R filename varname fileindex1 varindex1 fileindex2 varindex2 ... outputfile
Ex :
./multipleregress.R file_ERSST_tos_1960-2005.nc tos CO2_concentration_MaunaLoa.nc c02 ENSO_index.nc ENSO file_ERSST_tos_1960-2005_co2_and_ENSO_contribution.nc 0 > tos_c02_ENSO.out &
You can try to use it with some index I have left in the directory :
CO2 concentration at Mauna Loa from Climate Explorer and ENSO/PDO/PNA
index from NOAA website together with the corresponding index smoothed out
with a 1yr running mean.
## Filtering out a signal by a linear regression over a range of lags ===
./filteroutreg.R filename varname fileindex varindex outputfile
set_of_lags
Ex :
./filteroutreg.R file_ERSST_tos_1960-2005.nc tos
CO2_concentration_MaunaLoa.nc c02 file_ERSST_tos_1960-2005_withoutco2.nc 0 > tos_c02.out &
./filteroutreg.R file_ERSST_tos_1960-2005.nc tos ENSO_index.nc ENSO file_ERSST_tos_1960-2005_withoutENSO.nc -12 -6 0 6 12 > tos_enso.out &
You can try to use it with some index I have left in the directory :
CO2 concentration at Mauna Loa from Climate Explorer and ENSO/PDO/PNA
index from NOAA website together with the corresponding index smoothed out
with a 1yr running mean.
## Compute Poisson Regressions ===
./PoissonReg.R predictands.csv predictors.csv <betas.csv> <pval.csv> <pvalsand.csv>
**Input**:
predictands.csv: A list of predictands (e.g. number of cyclones). Has to be integers.
predictors.csv: A list of predictors (e.g. climate indices).
**Output** (can be given, else the default values will be used):
betas.csv: A matrix of the determinants of the regressions (beta values).
pval.csv: A matrix of the pvalues of the regressions.
pvalsand (optional) : The pvalues (in matrix form) after controlling for mild violation of the distribution assumption (pvalues robust to autoregression and heteroskedasticity). - Will only be produced if pvalsand.csv is given in the command line.
## Compute Poisson Regressions after accounting for a Trend
./PoissonReg.R predictands.csv predictors.csv trends.csv <betas.csv> <pval.csv> <pvalsand.csv>
**Input**:
predictands.csv: A list of predictands (e.g. number of cyclones). Has to be integers.
predictors.csv: A list of predictors (e.g. climate indices).
trends.csv: A list (max 6) of hockey stick funtions.
**Output** (can be given, else the default values will be used):
betas.csv: A matrix of the determinants of the regressions (beta values).
pval.csv: A matrix of the pvalues of the regressions.
pvalsand (optional) : The pvalues (in matrix form) after controlling for mild violation of the distribution assumption (pvalues robust to autoregression and heteroskedasticity). - Will only be produced if pvalsand.csv is given in the command line.
Clone repository
  • eigentechniques
  • Home
  • interpolation
  • regression
  • smoothing