Description Usage Arguments Details Value Examples
Calculates the components to predict all the dependent variables.
1 2 3 |
formula |
an object of class " |
data |
data frame. |
H |
vector of R integer. Number of components to keep for each theme |
family |
a vector of character of the same length as the number of dependent variables: "bernoulli", "binomial", "poisson" or "gaussian" is allowed. |
size |
describes the number of trials for the binomial dependent variables. A (number of statistical units * number of binomial dependent variables) matrix is expected. |
weights |
weights on individuals (not available for now) |
offset |
used for the poisson dependent variables. A vector or a matrix of size: number of observations * number of Poisson dependent variables is expected. |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data contain NAs. The default is set to |
crit |
a list of two elements : maxit and tol, describing respectively the maximum number of iterations and the tolerance convergence criterion for the Fisher scoring algorithm. Default is set to 50 and 10e-6 respectively. |
method |
structural relevance criterion. Object of class "method.SCGLR"
built by |
st |
logical (FALSE) theme build and fit order. TRUE means random, FALSE means sequential (T1, ..., Tr) |
Models for theme are specified symbolically. A model as the form response ~ terms
where response
is the numeric response vector and terms is a series of R themes composed of
predictors. Themes are separated by "|" (pipe) and are composed. ... Y1+Y2+...
~ X11+X12+...+X1_ | X21+X22+... | ...+X1_+... | A1+A2+... See multivariateFormula
.
a list of SCGLRTHM class. Each element is a SCGLR object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
library(SCGLR)
# load sample data
data(genus)
# get variable names from dataset
n <- names(genus)
n <-n[!n%in%c("geology","surface","lon","lat","forest","altitude")]
ny <- n[grep("^gen",n)] # Y <- names that begins with "gen"
nx1 <- n[grep("^evi",n)] # X <- remaining names
nx2 <- n[-c(grep("^evi",n),grep("^gen",n))]
form <- multivariateFormula(ny,nx1,nx2,A=c("geology"))
fam <- rep("poisson",length(ny))
testthm <-scglrTheme(form,data=genus,H=c(2,2),family=fam,offset = genus$surface)
plot(testthm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.