Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

bootstrap.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include "include/dft.h"
#include "include/petc99.h"
#include "include/powell.h"
#include "include/bootstrap.h"

Defines

#define RAND_MAX   32767
#define ITER_NR   200

Functions

int bootstrapQSort (const void *par1, const void *par2)
int bootstrap (double *cLim1, double *cLim2, double *SD, double *parameter, double *lowlim, double *uplim, int frameNr, double *tac, double *fitTac, int parNr, double *weight, double(*objf)(double *))

Variables

int bs_parNr
int bs_frameNr
double * bs_parameter
double * bs_uplim
double * bs_lowlim
double * bs_weight
double(* bs_func )(double *)

Define Documentation

#define ITER_NR   200
 

#define RAND_MAX   32767
 


Function Documentation

int bootstrap double *  cLim1,
double *  cLim2,
double *  SD,
double *  parameter,
double *  lowlim,
double *  uplim,
int  frameNr,
double *  tac,
double *  fitTac,
int  parNr,
double *  weight,
double(*)(double *)  objf
 

Bootstrap method.

Original weights are assumed to be inversely proportional to variance. Square root is used, because bootstrap assumes them to be proportinal to standard deviation. If only standard deviation is wanted then cLim1 and cLim2 can be set to be NULL, and if only the confidence limits are wanted then SD can be set to be NULL.

Returns:
Return values: 0, if ok. 1 - 3 if some of the given parameters is not qualified. 4, if Powell fails, and 5, if out of memory.
Parameters:
cLim1  vector to put the lower limits to
cLim2  vector to put the upper limits to
SD  vector to put the standard deviations to
parameter  Parameter estimates
lowlim  Lower limits for the parameters
uplim  Upper limits for the parameters
frameNr  Nr of time points in tissue data
tac  measured tissue TAC values (will be changed)
fitTac  fitted tissue TAC values (preserved)
parNr  Nr of parameters
weight  weights
objf  The object function

int bootstrapQSort const void *  par1,
const void *  par2
 

local function definitions


Variable Documentation

int bs_frameNr
 

double(* bs_func)(double *)
 

double* bs_lowlim
 

double* bs_parameter
 

int bs_parNr
 

double* bs_uplim
 

double* bs_weight
 


Generated on Fri Jan 21 16:17:40 2005 for libPET by  doxygen 1.4.1