File: bicenter.wt.Rd

package info (click to toggle)
r-cran-ade4 1.7-5-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 7,924 kB
  • sloc: ansic: 4,890; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
\name{bicenter.wt}
\alias{bicenter.wt}
\title{Double Weighted Centring}
\description{
This function creates a doubly centred matrix. 
}
\usage{
bicenter.wt(X, row.wt = rep(1, nrow(X)), col.wt = rep(1, ncol(X)))
}
\arguments{
  \item{X}{a matrix with n rows and p columns}
  \item{row.wt}{a vector of positive or null weights of length n}
  \item{col.wt}{a vector of positive or null weights of length p}
}
\value{
returns a doubly centred matrix
}
\author{
Daniel Chessel 
}
\examples{
w <- matrix(1:6, 3, 2)
bicenter.wt(w, c(0.2,0.6,0.2), c(0.3,0.7))

w <- matrix(1:20, 5, 4)
sum(bicenter.wt(w, runif(5), runif(4))^2)
}
\keyword{utilities}