Description Usage Arguments Details Value Examples

Similar to other predict methods, this functions predicts fitted
values, coefficients and more from a fitted `ggmix_fit`

object.

1 2 3 4 5 6 7 8 9 10 11 12 |

`object` |
Fitted |

`newx` |
matrix of values for |

`s` |
Value(s) of the penalty parameter |

`type` |
Type of prediction required. Type |

`covariance` |
covariance between test and training individuals. if there are q testing individuals and N-q training individuals, then this covariance matrix is q x (N-q) |

`...` |
additional arguments to pass to predict function |

`s`

is the new vector at which predictions are requested. If
`s`

is not in the lambda sequence used for fitting the model, the
predict function will use linear interpolation to make predictions. The new
values are interpolated using a fraction of predicted values from both left
and right lambda indices. `coef(...)`

is equivalent to
`predict(ggmix_fit, type="coefficients",...)`

. To get individual level
predictions at each value of lambda, you must provide the lambda sequence
to the s argument. You can pass either a ggmix_fit or ggmix_gic object. See
examples for more details.

The object returned depends on type.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
data("admixed")
fitlmm <- ggmix(x = admixed$xtrain, y = admixed$ytrain,
kinship = admixed$kin_train,
estimation = "full")
bicGGMIX <- gic(fitlmm,
an = log(length(admixed$ytrain)))
plot(bicGGMIX)
coef(bicGGMIX, s = "lambda.min")
yhat_test <- predict(bicGGMIX, s="lambda.min",
newx = admixed$xtest, type = "individual",
covariance = admixed$kin_test_train)
cor(yhat_test, admixed$ytest)
yhat_test_population <- predict(bicGGMIX, s="lambda.min",
newx = admixed$xtest,
type = "response")
``` |

ggmix documentation built on April 13, 2021, 9:06 a.m.

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.