Description Usage Arguments Details Value Author(s) Source See Also Examples
View source: R/mc_variance_function.R
Compute the variance function and its derivatives with respect to regression, dispersion and power parameters.
1 2 3 4 5 6 7 8 9 10  mc_variance_function(mu, power, Ntrial, variance, inverse,
derivative_power, derivative_mu)
mc_power(mu, power, inverse, derivative_power, derivative_mu)
mc_binomialP(mu, power, inverse, Ntrial,
derivative_power, derivative_mu)
mc_binomialPQ(mu, power, inverse, Ntrial,
derivative_power, derivative_mu)

mu 
a numeric vector. In general the output from

power 
a numeric value ( 
Ntrial 
number of trials, useful only when dealing with binomial response variables. 
variance 
a string specifying the name ( 
inverse 
logical. Compute the inverse or not. 
derivative_power 
logical if compute (TRUE) or not (FALSE) the derivatives with respect to the power parameter. 
derivative_mu 
logical if compute (TRUE) or not (FALSE) the derivative with respect to the mu parameter. 
The function mc_variance_function
computes three
features related with the variance function. Depending on the
logical arguments, the function returns V^{1/2} and its
derivatives with respect to the parameters power and mu,
respectivelly. The output is a named list, completely
informative about what the function has been computed. For
example, if inverse = FALSE
, derivative_power =
TRUE
and derivative_mu = TRUE
. The output will be a list,
with three elements: V_sqrt, D_V_sqrt_power and D_V_sqrt_mu.
A list with from one to four elements depends on the arguments.
Wagner Hugo Bonat, wbonat@ufpr.br
Bonat, W. H. and Jorgensen, B. (2016) Multivariate covariance generalized linear models. Journal of Royal Statistical Society  Series C X(X):XX–XX.
1 2 3 4 5 6 7  x1 < seq(1, 1, l = 5)
X < model.matrix(~x1)
mu < mc_link_function(beta = c(1, 0.5), X = X, offset = NULL,
link = "logit")
mc_variance_function(mu = mu$mu, power = c(2, 1), Ntrial = 1,
variance = "binomialPQ", inverse = FALSE,
derivative_power = TRUE, derivative_mu = TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.