https://github.com/cran/aster
Tip revision: 30dd0361d35879f8979ff405c11271e23686d40f authored by Charles J. Geyer on 09 July 2007, 00:00:00 UTC
version 0.7-2
version 0.7-2
Tip revision: 30dd036
asttrans5.c
#include "aster.h"
void aster_theta2ctau(int *nindin, int *nnodein, int *pred, int *fam,
double *theta, double *ctau)
{
int nind = nindin[0];
int nnode = nnodein[0];
int i, j, jfam, jbase;
aster_check_model(nindin, nnodein, pred, fam);
/* j is 1-origin indexing */
for (j = nnode; j > 0; --j) {
jfam = fam[j - 1];
jbase = nind * (j - 1);
for (i = 0; i < nind; ++i) {
int one = 1;
double foo;
aster_family(&jfam, &one, &theta[jbase + i], &foo);
ctau[jbase + i] = foo;
}
}
}