Error in sink(type = “output”) : invalid connection in map2stan in Windows 10
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
Hey guys, I met a problem to use map2stan for R modeling.
Description:
I got this [Error in sink(type = “output”) : invalid connection.] R version is 3.5.3. Library("rethinking") and ("rstan") are okay. And the function(map) is also okay . only map2stan has something wrong, I have reinstalled all relative packages, such as rethinking and rstan. Also, reinstalled R. These all didn‘t work. I attached my code. as below, Hope some guys can help me to fix it
The code:
library(rethinking)
data(reedfrogs)
d <- reedfrogs
make the tank cluster variable
d$tank <- 1:nrow(d)
fit
m12.1 <- map2stan(
alist(
surv ~ dbinom( density , p ) ,
logit(p) <- a_tank[tank] ,
a_tank[tank] ~ dnorm( 0 , 5 )
),
data=d )
precis(m12.1, depth = 2)
Current Output:
Error in sink(type = "output") : invalid connection
Error in map2stan(alist(surv ~ dbinom(density, p), logit(p) <- a_tank[tank], :
Something went wrong, when calling Stan. Check any debug messages for clues, detective.
invalid connection
RStan Version:
The version of RStan is 2.18.2
R Version:
The version of R is 3.5.3
Operating System:
Windows 10 64bits
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied map2stan example on Windows 10 with R 3.5.3 and RStan 2.18.2, then inspect the reported debug output around map2stan and its invalid sink connection. Done means the example runs without the invalid-connection error and produces the expected model output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100