s_soda_pred {sodavis}R Documentation

Predict the response y using S-SODA model.

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

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.


[Package sodavis version 1.2 Index]