ModelSelect {Dark} | R Documentation |

## ModelSelect

### Description

Returns a list with two elements; an array of AICc scores indexed by the number of parameters in the model considered and a matrix of parameters with three rows, one for each model.

### Usage

```
ModelSelect(obj, P)
```

### Arguments

`obj` |
A 'dark' object. |

`P` |
Is a matrix with seven columns and at least one row. The values of each element can be zero. |

### Details

This is a *brute-force* method to make a first estimate of the optimal model parameters.

The matrix 'P' holds rows of possible parameter values. Each row is passed to the 3, 5, and 7 parameter models and the sum of residuals squared is calculated for the given times (obj$time) and thresholds (obj$thrs). So for each row in 'P' there is a score for each model. Then for each model the row which yields the lowest SSE is chosen as a starting point for optimisation. The optimised parameters are stored in 'param' and once the three parameter arrays have been found their AICc scores are found and returned as AIC.

### Value

Returns a list

`AIC` |
An array of seven values with AIC scores at the index of model parameter count. |

`param` |
A three row by seven column matrix. Each row containing the optimised parameters for each model. |

### Author(s)

Jeremiah MF Kelly

Faculty of Life Sciences, The University of Manchester, M13 9PL, UK

### References

http://en.wikipedia.org/wiki/Brute-force_search

### Examples

```
set.seed(1234)
tmp<- TestData(0:20)
P<-Start(tmp)
ModelSelect(tmp,P)
```

*Dark*version 0.9.8 Index]