init_bspbss {BSPBSS} | R Documentation |

## Initial values

### Description

Generate initial values, set up priors and perform kernel decomposition for the MCMC algorithm.

### Usage

```
init_bspbss(
X,
coords,
rescale = TRUE,
center = FALSE,
q = 2,
dens = 0.5,
ker_par = c(0.05, 20),
num_eigen = 500,
noise = 0
)
```

### Arguments

`X` |
Data matrix with n rows (sample) and p columns (voxel). |

`coords` |
Cordinate matrix with p rows (voxel) and d columns (dimension). |

`rescale` |
If TRUE, rows of X are rescaled to have unit variance. |

`center` |
If TRUE, rows of X are mean-centered. |

`q` |
Number of latent sources. |

`dens` |
The initial density level (between 0 and 1) of the latent sources. |

`ker_par` |
2-dimensional vector (a,b) with a>0, b>0, specifing the parameters in the modified exponetial squared kernel. |

`num_eigen` |
Number of eigen functions. |

`noise` |
Gaussian noise added to the initial latent sources, with mean 0 and standard deviation being noise * sd(S0), where sd(S0) is the standard deviation of the initial latent sources. |

### Value

List containing initial values, priors and eigen functions/eigen values of the kernel of the Gaussian process.

### Examples

```
sim = sim_2Dimage(length = 30, sigma = 5e-4, n = 30, smooth = 6)
ini = init_bspbss(sim$X, sim$coords, q = 3, ker_par = c(0.1,50), num_eigen = 50)
```

*BSPBSS*version 1.0.5 Index]