diff --git a/man/DesignSpace.Rd b/man/DesignSpace.Rd index 179d8ee..daebb2e 100644 --- a/man/DesignSpace.Rd +++ b/man/DesignSpace.Rd @@ -44,10 +44,11 @@ where M is the information matrix and C is a vector. Typically C will be a vecto parameter of interest. For example, if the columns of X in the design are an interdept, the treatment indicator, and then time period indicators, the vector C may be `c(0,1,0,0,...)`, such that the objective function is the variance of that parameter. If there are multiple designs in the design space, the C vectors do -not have to be the same as the columns of X in each design might differ. +not have to be the same as the columns of X in each design might differ. All the algorithms included in this package are described in +Watson, Hemming, and Girling (2023) and Watson (2023) . If the experimental conditions are correlated with one another, then one of three combinatorial algorithms can be used, see -Watson and Pan, 2022 . The algorithms are: (i) local search, which starts from a random design of size m and then +Watson and Pan, 2022 . The algorithms are: (i) local search, which starts from a random design of size m and then makes the best swap between an experimental condition in and out of the design until no variance improving swap can be made; (ii) greedy search, which starts from a design of size p << n and then sequentially adds the best experimental condition until it generates a design of size m; (iii) reverse greedy search, which starts from the complete set of N experimental conditions and @@ -61,6 +62,10 @@ The approximate algorithm will return weights in [0,1] for each unique experimen the "proportion of effort" to spend on each design condition. There are different ways to translate these weights into integer values, which are returned see \link[glmmrOptim]{apportion}. Use of the approximate optimal design algorithm can be disabled used `use_combin=TRUE` +A weights algorithm for cases including when the observations are correlated are also included. This algorithm determines the +GLMM estimation weights that minimise the variance. The algorithm is described in Watson, Hemming, and Girling (2023) +along with the other algoithms in this package. + In some cases the optimal design will not be full rank with respect to the design matrix X of the design space. This will result in a non-positive definite information matrix, and an error. The program will indicate which columns of X are likely "empty" in the optimal design. The user can then optionally remove these columns in the algorithm using the `rm_cols` argument, which will delete the @@ -175,7 +180,7 @@ des2 <- des$clone(deep=TRUE) des2$covariance <- Covariance$new( data = df, formula = ~ (1|gr(cl)*ar1(t)), - parameters = c(0.25,0.8) + parameters = c(0.05,0.8) ) ds <- DesignSpace$new(des,des2) #weighted average assuming equal weights using local search @@ -433,7 +438,8 @@ linked design objects. Defaults to FALSE.} \item{\code{algo}}{A vector of integers indicating the algorithm(s) to use. 1 = local search, 2 = greedy search, 3 = reverse greedy search. Declaring `algo = 1` for example will use the local search. Providing a vector such as `c(3,1)` will execute the algorithms in order, so this would run a reverse greedy search followed by a local search. Note that many combinations will be redundant. For example, running -a greedy search after a local search will not have any effect.} +a greedy search after a local search will not have any effect. One can also use a general weights algorithm called the 'girling' algorithm, +setting `algo="girling"`.} \item{\code{use_combin}}{Logical. If the experimental conditions are uncorrelated, if this option is TRUE then the hill climbing algorithm will be used, otherwise if it is FALSE, then a fast approximate alternative will be used. See Details} @@ -494,7 +500,7 @@ des2 <- des$clone(deep=TRUE) des2$covariance <- Covariance$new( data = df, formula = ~ (1|gr(cl)*ar1(t)), - parameters = c(0.25,0.8) + parameters = c(0.05,0.8) ) ds <- DesignSpace$new(des,des2) #weighted average assuming equal weights using local search diff --git a/src/Makevars.win b/src/Makevars.win index 32c175e..c32a21c 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,4 +1,4 @@ CXX_STD = CXX17 -PKG_CPPFLAGS = -I../inst/include/ +PKG_CPPFLAGS = -I../inst/include/ -Wa,-mbig-obj PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)