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 rownames(K) : object 'K' not found #5

Open
yy0520s opened this issue Feb 4, 2020 · 6 comments
Open

Error in rownames(K) : object 'K' not found #5

yy0520s opened this issue Feb 4, 2020 · 6 comments

Comments

@yy0520s
Copy link

yy0520s commented Feb 4, 2020

Hi sir,
I tried to run the package using your guide :

Load required packages

install.packages('devtools')
devtools::install_git('https://github.com/chrism0dwk/wuhan.git')
library(wuhan)

Instantiate ODE model, simulate up to day 22.

simulator = NetworkODEModel(N=china_population, K=K, init_loc='Wuhan', alpha=1/4, max_t=22)

Instantiate LogLikelihood function

llik = LogLikelihood(y=china_cases, z=world_cases, N=N, K=K, W=W, sim_fun=simulator)

Find MLEs using optimisation

p_hat = optim(log(par_init), llik, control=list(fnscale=-1))

However I met a problem:

p_hat = optim(log(par_init), llik, control=list(fnscale=-1))
Error in rownames(K) : object 'K' not found
In addition: Warning message:
In rownames(K) : restarting interrupted promise evaluation

Since I do not use R very much, I cannot find the bug. Could you please help me with that? I appreciate a lot.

@TimeWz667
Copy link

This is the air travel data.
I think they did not release because of some license issue.

Dear Chris,

Is it possible to release an emulated dataset with K and W for testing and viewing the data structures?

Many thanks

@CHLAI0410
Copy link

Same here.
Having difficulty reproducing the model.
Would be nice to have a sample or knowing the format for the required aviation data K.

@HVoltBb
Copy link

HVoltBb commented Feb 7, 2020

K is not included. OAG data are not free.

@mqupupup
Copy link

mqupupup commented Feb 9, 2020

p_hat = optim(log(par_init), llik, control=list(fnscale=-1))
Error in optim(log(par_init), llik, control = list(fnscale = -1)) :
couldn‘t find the’'par_init',I will appreciate you if you can reply me soon.

@HVoltBb
Copy link

HVoltBb commented Feb 9, 2020

par_init could be any reasonable list of numbers. It is just the initial values to try.

@mqupupup
Copy link

K is not included. OAG data are not free.

If possible,how much I need pay for it?

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

5 participants