Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in apply #19

Open
madichpy opened this issue May 5, 2021 · 0 comments
Open

Error in apply #19

madichpy opened this issue May 5, 2021 · 0 comments

Comments

@madichpy
Copy link

madichpy commented May 5, 2021

Hello
I am trying to use SCGLR package for a multivariate analysis that includes 3 dependent variables, 1 categorical dependent variable (burnt and unburnt), and two additional covariates (temperature and humidity), but I get this error when trying to complete the script:
Error in apply(x, 2, mean) : dim(X) must have a positive length

Can anyone tell me what is causing this?

I present my script (and its results) below:

build multivariate formula

ny <- c("taxa_pulsos","duracao","energia")
nx1 <- c("fogo")
nadd <- c("temperatura","umidade")
form <- multivariateFormula(ny,nx1,A=nadd)
form
Multivariate formula
taxa_pulsos + duracao + energia ~ fogo | temperatura + umidade
Response:
Y = taxa_pulsos + duracao + energia
Covariates:
T1 = fogo
A = temperatura + umidade

summary(form)
Length1 Length2 Class1 Class2
1 2 MultivariateFormula Formula
Class3 Mode
formula call

define family

fam <- rep("poisson",length(ny))
genus.scglr <- scglr(formula=form,,data = dados,family=fam)
Error in apply(x, 2, mean) : dim(X) must have a positive length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant