Description Usage Arguments Value Author(s) Examples
View source: R/cont_flm_plot.R
This function produces two plots: An effect of a continuous covariate on activity values by time and the F-test for the effect of the continuous covariate.
1 2 | cont_flm_plot(smoothdata, matchresults, flmresults, xlim, ylim,
ftest, nperm, lb, xat, legendx, legendy, L, xlab="Time", ylab="Activity")
|
smoothdata |
List output from the |
matchresults |
List output from the |
flmresults |
List output from the |
xlim |
X axis limits for activity plot. |
ylim |
Y axis limits for activity plot. |
ftest |
A logic value indicating whether to implement F test or not. F test will be implement if |
nperm |
The number of permutations for the F-test. |
lb |
X-axis labels. |
xat |
X axis label positions. |
legendx |
X axis position of the left edge of the legend box. |
legendy |
Y axis position of the upper edge of the legend box. |
L |
The length of the time points. |
xlab |
The label for the x-axis. |
ylab |
The label for the y-axis. |
One plot of the estimated group means and a possible second plot of the F-test results.
William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | data(act_29pt)
data(clinic_29pt_ahi)
data <- act_29pt
ahi <- clinic_29pt_ahi
matchid <- fda.matchid(data, ahi, "contin")
FDcont <- fda.smoothdata(matchid)
L <- nrow(data)
lb <- c("Midnight", "6AM", "Noon", "6PM", "Midnight")
xat <- c(0, L/4, L/2, 3*L/4, L)
geftFDcont <- flm_cate(FDcont)
predy <- as.vector(geftFDcont$freg$yhatfdobj$y)
xlim <- c(0, L)
ylim <- c(min(predy), max(predy) + 100)
legendx <- 0
legendy <- max(predy) - 100
cont.flm.results <- cont_flm_plot(FDcont, matchid, geftFDcont, xlim,
ylim, TRUE, 10, lb, xat, legendx, legendy, L)
|
Loading required package: fda
Loading required package: splines
Loading required package: Matrix
Attaching package: 'fda'
The following object is masked from 'package:graphics':
matplot
Warning messages:
1: In as.vector(y) : NAs introduced by coercion
2: In charmatch(as.numeric(commonid), as.numeric(numcolnames)) :
NAs introduced by coercion
[1] "Permutation F test running (10 permutations)"
[1] "Estimated Computing time = 1 seconds"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.