flr / FLXSA

The FLXSA package
http://flr-project.org/FLXSA
2 stars 3 forks source link

SE of q.hat reported incorrectly in diagnostics() function #7

Closed hgerritsen closed 4 years ago

hgerritsen commented 4 years ago

the diagnostics function calculates the se of the log q as follows:

 S.E_Logq = round(c(sd(matrix(object@index.res[[f]], 
                  dim(object@index.res[[f]])[2], dim(object@index.res[[f]])[1], 
                  byrow = T), na.rm = T)), 4)

It therefore assumes the se is the same for all ages, when you look at the old VPA95 output, you get different se estimates for each age. You can replicate this by simply doing this:

apply(object@index.res[[f]],1,sd)

presumably this is a bug in the diagnostics function

iagomosqueira commented 4 years ago

Does the output of diagnostics look OK now?

hgerritsen commented 4 years ago

Yeee! Thanks

From: Iago Mosqueira [mailto:notifications@github.com] Sent: Tuesday 11 February 2020 20:58 To: flr/FLXSA FLXSA@noreply.github.com Cc: Hans Gerritsen hans.Gerritsen@Marine.ie; Author author@noreply.github.com Subject: Re: [flr/FLXSA] SE of q.hat reported incorrectly in diagnostics() function (#7)

Does the output of diagnostics look OK now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/flr/FLXSA/issues/7?email_source=notifications&email_token=AHA5GPJ7EF5C555JBIQSKOLRCMGO3A5CNFSM4KSKBCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELOBFOQ#issuecomment-584848058, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHA5GPKRYP633FD7VGNE5UDRCMGO3ANCNFSM4KSKBCPA.

hgerritsen commented 4 years ago

Perfect, thanks