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

confint() environment issues #23

Open
parksw3 opened this issue Jul 19, 2019 · 0 comments
Open

confint() environment issues #23

parksw3 opened this issue Jul 19, 2019 · 0 comments

Comments

@parksw3
Copy link

parksw3 commented Jul 19, 2019

library(bbmle)

y <- rnorm(100)
d <- data.frame(y)

mlefun <- function(fixed=NULL) {
	m <- mle2(y ~ dnorm(mean=mu, sd=sigma),
		 data=d,
		 fixed=fixed,
		 start=list(mu=0, sigma=1))
	
	confint(m)
}
## this breaks
mlefun()

## need to define 'fixed' in the global environment
fixed <- NULL
## this runs now
mlefun()

@parksw3 parksw3 changed the title environment issues confint() environment issues Jul 19, 2019
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