Message-ID: <1237810391.6157.18.camel@chupchup>
Date: 2009-03-23T12:13:11Z
From: Hufkens Koen
Subject: Iterative Proportional Fitting, use
Hi list,
I would like to normalize a matrix (two actually for comparison) using
iterative proportional fitting.
Using ipf() would be the easiest way to do this, however I can't get my
head around the use of the function. More specifically, the margins
settings...
for a matrix:
mat <- matrix(c(65,4,22,24,6,81,5,8,0,11,85,19,4,7,3,90),4,4)
using
fit <- ipf(mat,margins=c(1,1,1,1,0,1,1,1,1))
generates a matrix with just 1's.
using
fit <- ipf(mat,margins=c(100,100,100,100,0,100,100,100,100))
gives a segmentation fault and crashes R !
so how do you define the margin values to which to sum the row and
column values in your matrix correctly?
Kind regards,
Koen