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

explain weird predict behaviour #143

Open
eeholmes opened this issue Oct 14, 2021 · 0 comments
Open

explain weird predict behaviour #143

eeholmes opened this issue Oct 14, 2021 · 0 comments
Assignees
Projects
Milestone

Comments

@eeholmes
Copy link
Collaborator

Need to explain to user why this occurs

# Covariate example
fulldat <- lakeWAplanktonTrans
years <- fulldat[,"Year"]>=1965 & fulldat[,"Year"]<1975
dat <- t(fulldat[years,c("Greens", "Bluegreens")])
dat <- zscore(dat)
covariates <- rbind(
  Temp = fulldat[years, "Temp"],
  TP = fulldat[years, "TP"])
covariates <- zscore(covariates)
A <- U <- "zero"
B <- Z <- "identity"
R <- diag(0.16,2)
Q <- "equalvarcov"
C <- "unconstrained"
model.list <- list(B=B,U=U,Q=Q,Z=Z,A=A,R=R,C=C,c=covariates)
fit <- MARSS(dat, model=model.list)

Looks bad

plot(predict(fit,  newdata=list(y=dat, c=matrix(5,2,120)), type="ytt1"))

Looks better

plot(predict(fit,  newdata=list(y=dat, c=matrix(5,2,120)), type="ytt"))

Looks best

plot(predict(fit,  newdata=list(y=dat, c=matrix(5,2,120)), type="ytT"))
@eeholmes eeholmes added this to the 3.11.5 milestone Oct 14, 2021
@eeholmes eeholmes self-assigned this Oct 14, 2021
@project-bot project-bot bot added this to MARSS in 1 Overall Progress Oct 14, 2021
@project-bot project-bot bot added this to New Issues in Milestones Oct 14, 2021
eeholmes added a commit that referenced this issue Oct 29, 2021
* add notes
@eeholmes eeholmes removed this from MARSS in 1 Overall Progress Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Milestones
New Issues
Development

No branches or pull requests

1 participant