s_soda_pred: Predict the response y using S-SODA model.

Description Usage Arguments Value

View source: R/pure_soda.R

Description

S-SODA assumes within each slice the X vector follow multivariate normal distribution. This function predicts the response y by reverting the P(X | slice(y)) to P(slice(y) | X), and estimates the E(y|X) as sum_h E(y | slice(y)=h, X) P (slice(y)=h | X)

Usage

1
s_soda_pred(x, model, po = 1)

Arguments

x

The design matrix, of dimensions n * p, without an intercept. Each row is an observation vector.

model

S-SODA model estimated from s_soda_model function.

po

Order of terms in X to approximate E(y | slice(y)=h, X). If po=0, E(y | slice(y)=h, X) is the mean of y in slice h. If po=1, E(y | slice(y)=h, X) is the linear regression of X to predict y in slice h. If po=2, the linear regression also include 2nd order terms of X.

Value

Predicted response.


sodavis documentation built on May 2, 2019, 12:38 p.m.

Related to s_soda_pred in sodavis...