Library: | kernel |
See also: | gau denxest regxest sker |
Quantlet: | ngau | |
Description: | Computes the rescaled (multivariate) Gaussian kernel ngau(u) = 5.*gau(5.*u). |
Usage: | y = ngau(x) | |
Input: | ||
x | n x p matrix (or array) | |
Output: | ||
y | n x 1 matrix (or array) |
library("kernel") library("plot") x = aseq(-5, 101, 0.1) y = ngau(x) dat1 = setmask(x~y, "line", "blue") d = createdisplay(2, 1) show(d, 1, 1, dat1) ; now a two dimensional normal density x = grid(#(-1, -1), #(0.04, 0.04), #(50,50)) y = ngau(x) dat2 = setmask(x~y, "line", "red") show(d, 2, 1, dat2) setgopt(d, 2, 1, "title", "rotate!")
A two port display is opened with a one dimensional and a two dimensional gaussian kernel