View source: R/summary_statistics.R

orderDist | R Documentation |

Summarizes (difference) distribution of replicate series, by regressing ordered differenced series on a reference series (which might correspond to observed data).

orderDist(x, z, np = 3, diff = 1)

`x` |
a matrix. Each column contains a replicate series. |

`z` |
vector of lags, for rhs terms. |

`np` |
maximum power on rhs of regression. |

`diff` |
order of differencing (zero for none). |

a matrix where each column contains the coefficients for a different replicate.

Simon N. Wood, maintainer Matteo Fasiolo <matteo.fasiolo@gmail.com>.

library(synlik) set.seed(10) n <- 100;nr <- 3 x <- matrix(runif(n*nr),n,nr) z <- runif(n) beta <- orderDist(x,z,np=3,diff=1) zd <- z;xd <- x[,3] zd <- diff(zd,1);xd <- diff(xd,1) zd <- sort(zd);zd <- zd - mean(zd) xd <- sort(xd);xd <- xd - mean(xd) lm(xd~zd+I(zd^2)+I(zd^3)-1)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.