orderDist: Summarize marginal distribution of (differenced) series.

Description Usage Arguments Value Author(s) Examples

View source: R/summary_statistics.R

Description

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

Usage

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

Arguments

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).

Value

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

Author(s)

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

synlik documentation built on May 25, 2021, 5:09 p.m.