Description Usage Arguments Details Value See Also Examples
View source: R/Package_HAC_RAC_SHAC.r
Obtain the initial estimates of functional parameters (mean, var, shape and skewness) when both the mean and variance are covariate depedent but the skewness is covariate independent.
1 2 | case2.b.initial(y, tp, cp, nbasis.mean = 10, gam.method = "REML",
bin = 10, skew.method = "mle", cate = 1)
|
y |
observed data matrix |
tp |
timepoint vector with length = |
cp |
covariate vector with length = |
nbasis.mean |
number of bases when smoothing the mean |
gam.method |
smoothing method for the mean |
bin |
the length of bin to estimate the variance |
skew.method |
estimation method for skewness; See 'Details' |
cate |
method category, taking values as |
The variance is estimated using binning method with length = bin
. The skewness
can be estimated by method of moment mome
or maximum likelihood mle
. Stepwise estimates
are used here: the variance is based on the residuals after removing the mean effect; the skewness
is based on the scaled residuals after removing both the mean and variance effect.
cate
indiates the method cateory as follows:
cate = 1
all three parameter functions are to be estimated
cate = 2
the skewnewss parameter is fixed as 0
cate = 3
the mean to be fixed at 0; typically used when a stepwise estimation procedure is used, e.g. 2cSFM
in
cSFM.est
A list of initial estimate of parmeters (length 4: mean, variance, shape and skewness).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(data.simulation)
## Not run:
cp.hat <- case2.b.initial(y = DST$obs, tp= DST$tp, cp=DST$cp)
# visulize the parameter function and the estimated function
par(mfrow = c(1,2))
persp(DST$cp, DST$tp, exp(DST$pars$logvar), theta=60, phi=15,
ticktype = "detailed", col="lightblue",
xlab = "covariate", ylab = "time",
zlab="data", main="variance surface")
persp(DST$cp, DST$tp, cp.hat$var, theta=60, phi=15,
ticktype = "detailed", col="lightblue",
xlab = "covariate", ylab = "time",
zlab="data", main="initial estiamtes")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.