Learn R Programming

tramME (version 0.0.1)

coef<-.tramME: Set coefficients of a tramME model.

Description

Sets the whole vector of coefficients of a tramME model. The parameters of the baseline transformation function should respect the restrictions of the parameter space. This is checked before setting the new parameter values. When called on a fitted tram object, the function sets it to unfitted and removes all parts that come from the estimation.

Usage

# S3 method for tramME
coef(object) <- value

Arguments

object

A tramME object (fitted or unfitted).

value

Numeric vector of new coefficient values.

Value

An unfitted tramME object with the new coefficient values.

Examples

Run this code
# NOT RUN {
data("sleepstudy", package = "lme4")
mod <- LmME(Reaction ~ Days + (Days | Subject), data = sleepstudy, nofit = TRUE)
coef(mod) <- c(-1, 0.5, 1)
# }

Run the code above in your browser using DataLab