Skip to content

data transformation using gamma

2 messages · Roslina Zakaria, Patrizio Frederic

#
Roslina,
this code performs what you need:

dt	= matrix((1:(58*12))/58/12,58) # some numbers
# if dt is a data.frame use dt = as.matrix(dt)
a	= (1:12)/12 # some a coef
b	= (12:1)/12 # some b coef
dtgam	= matrix(pgamma(dt,a,b),58)
# dtgam is the transformation you're looking for

no loop needed no transform function involved
cheers,

Patrizio


2009/5/7 Roslina Zakaria <zroslina at yahoo.com>: