% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/01-s4_generics.R, R/03-s4_methods.R
\name{weights}
\alias{weights}
\alias{weights,m8_model-method}
\title{Extract model weights}
\usage{
weights(object, ...)

\S4method{weights}{m8_model}(object, orth = FALSE)
}
\arguments{
\item{object}{An object of class \code{m8_model}.}

\item{...}{Additional arguments (currently ignored).}

\item{orth}{Logical indicating whether orthogonal scores should be returned
(only applicable for OPLS models).}
}
\value{
Numeric vector or matrix containing model weights.
}
\description{
Extract model weights
}
\examples{
data(covid)
cv <- balanced_mc(k=5, split=2/3)
scaling <- uv_scaling(center=TRUE)
model <-opls(X=covid$X, Y=covid$an$type, scaling, cv)
show(model)
W <- weights(model)
Wo <- weights(model, orth = TRUE)
dim(W)
dim(Wo) == dim(W)
}
