Learn R Programming

wux (version 2.1-1)

reconstruct: Missing value reconstruction based on ANOVA

Description

Performs a simple missing value reconstruction based on an ANOVA with two factors using different methods.

Usage

reconstruct(x, factor1.name, factor2.name,
 data.name, method = "LES", iterations.num = 100)

Arguments

x
WUX data frame of class "wux.df" obtained from models2wux
factor1.name
Name of the 1st factor.
factor2.name
Name of the 2nd factor.
data.name
Name of the variable to be reconstructed.
method
One of the currently implemented methods: "LES", "Iterative" or "IterativeCC". See details section.
iterations.num
Number of iterations to be performed. Used only for method "Iterative" or "IterativeCC".

Value

  • Returns a WUX data frame containing the reconstructed data of class c("rwux.df", "wux.df", "data.frame").

encoding

UTF-8

Details

Tools for filling missing values of an unbalanced climate model simulation matrix (e.g. missing RCM-GCM combinations of ENSEMBLES) in order to avoid biased ensemble estimates. Following methods are currently implemented: method = "LES" (default){ Performs a simple missing value reconstruction with two factors based on solving the linear equation system (LES) of the ANOVA. The algorithm follows Déqué{Deque} et al. (2007) but the reconstruction is based on solving the linear equation system (LES) of the ANOVA instead of reconstructing iteratively. The main advantages of this method are that it is much faster and can be more easily extended to more factors than the original one. However, keep in mind that the results slightly differ from the iterative procedure proposed by Déqué{Deque} et al. (2007). The reconstruction algorithm is based on unique factor combinations (i.e. one element per combination of factor1.name and factor2.name). } method = "Iterative"{ The data reconstruction follows the iterative procedure based on the ANOVA proposed by Déqué{Deque} et al. (2007). The reconstruction algorithm is based on unique factor combinations (i.e. one element per combination of factor1.name and factor2.name). } method = "IterativeCC"{ Performs a leave one out cross calculation (CC) of the ANOVA based missing value reconstruction with two factors based on and following the iterative procedure of method = "Iterative". }

References

Déqué{Deque} M, Rowell DP, Lüthi{Luethi} D, Giorgi F, Christensen JH, Rockel B, Jacob D, Kjellström{Kjellstroem} E, de Castro M, van den Hurk B. 2007. An intercomparison of regional climate simulations for Europe: Assessing uncertainties in model projections. Climatic Change 81: 53--70. DOI:10.1007/s10584-006-9228-x.

Examples

Run this code
## load WUX and read WUX test data
require(wux)
data(ensembles)

wuxtest.df <- subset(ensembles, subreg == "GAR")

## unique model acronyms are required for reconstruction
wuxtest.df$acronym <- factor(paste(wuxtest.df$institute, "_", wuxtest.df$rcm, sep=""))

## reconstruction of the  missing data
reconstructLES.df <- reconstruct(wuxtest.df,
  factor1.name = "acronym", factor2.name = "gcm", data.name =
  "perc.delta.precipitation_amount", method = "LES")

## reconstruction of the  missing data using iterative apporach from
## Deque et al (2007)
reconstructIterative.df <- reconstruct(wuxtest.df,
  factor1.name = "acronym", factor2.name = "gcm", data.name =
  "perc.delta.precipitation_amount", method = "Iterative",
  iterations.num = 10)

## reconstruction of the  missing data using iterative apporach with
## cross-calculation. This can take some time.
reconstructIterative.df <- reconstruct(wuxtest.df,
  factor1.name = "acronym", factor2.name = "gcm", data.name =
  "perc.delta.precipitation_amount", method = "IterativeCC",
  iterations.num = 10)

Run the code above in your browser using DataLab