TS_trend: Time series trend modelling

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/TS_trend.R

Description

Fit linear and logistic trends to G-BLUEs time series.

Usage

1
TS_trend(data, linear = TRUE, logistic = TRUE)

Arguments

data

numeric matrix of dimension N_genotype x N_days containing the G-BLUEs time series. Such an object can be obtained with the function SpaTemHTP_proc.

linear

Logical value specifying if the linear trend should be fitted. Default = TRUE.

logistic

Logical value specifying if the logistic trend should be fitted. Default = TRUE.

Details

The function fit a linear and/ or a logistic function to the genotype best linear unbiased estimates time series obtained with the function SpaTemHTP_proc. The logistic function is fitted using the function drm from package drc.

Value

Return:

lin_res

list containing the parameters of the G-BLUEs TS linear trends.

lin_R2

Vector of r squared goodness of fit statistic for each G-BLUEs TS modeled with the linear trend.

log_res

list containing the parameters of the G-BLUEs TS linear trends.

log_R2

Vector of r squared goodness of fit statistic for each G-BLUEs TS modeled with the logistic trend.

log_val

matrix of predicted values according to the fitted logistic trend for each G-BLUEs TS.

Author(s)

Soumyashree Kar, Vincent Garin

References

Ritz, C., Baty, F., Streibig, J. C., Gerhard, D. (2015) Dose-Response Analysis Using R PLOS ONE, 10(12), e0146021

See Also

SpaTemHTP_proc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
data(SG_PH_data)

SG_PH_data$col_f <- factor(SG_PH_data$col)
SG_PH_data$row_f <- factor(SG_PH_data$row)

SG_PH_data$rep <- factor(SG_PH_data$rep)
SG_PH_data$block <- factor(SG_PH_data$block)

exp_des_data = SG_PH_data[, c("row", "col", "row_f", "col_f","genotype",
"rep", "block")]

## Not run: 

G_BLUEs <- SpaTemHTP_proc(exp_des_data, pheno_data = SG_PH_data[, 6:8],
                          out_det = TRUE, miss_imp = TRUE, sp_adj = TRUE,
                          random = ~ rep +  rep:block + row_f + col_f,
                          plot = TRUE)
                          
G_TS_trend <- TS_trend(G_BLUEs)


## End(Not run)

ICRISAT-GEMS/SpaTemHTP documentation built on March 9, 2021, 12:12 a.m.