% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procmod_model.R
\name{procmod_interaction_matrix}
\alias{procmod_interaction_matrix}
\title{Computes interaction matrix.}
\usage{
procmod_interaction_matrix(data1, data2)
}
\arguments{
\item{data1}{the first matrix involved in the interaction}

\item{data2}{the second matrix involved into the interaction}
}
\value{
a numeric matrix corresponding to the interaction matrix
}
\description{
In the procrotean models \code{\link[ProcMod]{pm}}, interactions
between explicative matrix are treated as adding an interaction
matrix to the model. An interaction matrix is computed by first,
aligning the matrix with the smaller number of columns to the other
using procrustean rotation, then both matrices are multiplied using the
Hadamar product.
}
\examples{

    d1 <- as.data.frame(matrix(rnorm(12),
                       nrow = 4))
    d1$f <- factor(sample(c("A","B","C"),
                         4,
                         replace=TRUE),
                  levels = c("A","B","C","D"))

    n <- matrix(rnorm(12),
                nrow = 4)

    d2 <-dist(n)

    procmod_interaction_matrix(d1,d2)

}
