loessPred: Fit a loess model to the p-value data for later use in...

Description Usage Arguments Value See Also Examples

Description

Given a vector of p-values and two population parameters, this will fit a loess model to the data, with the model of the form z ~ x * y, where z is the predicted p-value. This can later be used to make a heatmap, and is separated from the heatmap2 function because of the long amount of time it can take for this function to run.

Usage

1
2
3
loessPred(pval, paramX, paramY, minx = 0.01, maxx = 2.99,
  miny = 0.01, maxy = 2.99, svec = rep(TRUE, length(paramX)),
  span = 0.9)

Arguments

pval

vector of p-values from simulated runs

paramX

population parameter to condition z on (e.g., a column from a matrix created using createParamMx). This will appear on the x-axis of the heatmap.

paramY

same as paramX, but for the Y-axis

minx

minimum x value

maxx

maximum x value

miny

minimum y value

maxy

maximum y value

svec

a logical vector to select out only certain rows from pval, paramX and paramY

span

a value to be passed along to the loess function that determines the smoothing level

Value

A fitted loess model.

See Also

loess, heatmap2

Examples

1
2
3
4
5
6
7
pmx <- createParamMx(100)

result <- apply(pmx, 1, function(x) {fitanova(mkDf(24,24,mcr.params=x,FALSE),FALSE)})
lpred <- loessPred(pval=result["pmax",],
                paramX=pmx[,"t11"], paramY=pmx[,"w11"])

heatmap2(lpred, "t11", "w11", "F1+F2")

dalejbarr/simgen documentation built on May 14, 2019, 3:32 p.m.