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

VPA does not compute stock.n for the whole series #2

Open
iagomosqueira opened this issue Jul 18, 2014 · 1 comment
Open

VPA does not compute stock.n for the whole series #2

iagomosqueira opened this issue Jul 18, 2014 · 1 comment
Assignees

Comments

@iagomosqueira
Copy link
Member

If the example in VPA.Rd is run, abundances are only calculated back to 2003 for all ages, and then the cohort starts disappearing.

@iagomosqueira iagomosqueira self-assigned this Jul 18, 2014
@marchtaylor
Copy link

marchtaylor commented May 11, 2016

I have just noticed that this example does not provide harvest values for the final year of the ple4 stock object (2008); rather "2001" was used - and the VPA fails. The following works:

# use the ple4 data set
data(ple4)
ple4.test <- ple4
# Remove 0s and set as 1s
catch.n(ple4.test)[catch.n(ple4.test)==0] <- 1
# Remove harvest and stock.n values
stock.n(ple4.test)[] <- NA
harvest(ple4.test)[] <- NA
# Set Fs in final year and final ages
harvest(ple4.test)[,"2008"] <- harvest(ple4)[,"2008"]
harvest(ple4.test)["10",] <- harvest(ple4)["10",]
# Run the VPA
ple4.vpa <- VPA(ple4.test)
# Take a look at the harvest
plot(harvest(ple4.vpa))

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

2 participants