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

'reject' stan command conflicts with UCBadmit data #413

Open
bjbarrett opened this issue Oct 27, 2023 · 0 comments
Open

'reject' stan command conflicts with UCBadmit data #413

bjbarrett opened this issue Oct 27, 2023 · 0 comments

Comments

@bjbarrett
Copy link

Was going thru the examples on the github page. Running this code:

data( UCBadmit )
UCBadmit$male <- as.integer(UCBadmit$applicant.gender=="male")
UCBadmit$dept <- rep( 1:6 , each=2 )
UCBadmit$applicant.gender <- NULL

m_glmm1 <- ulam(
    alist(
        admit ~ binomial(applications,p),
        logit(p) <- a[dept] + b*male,
        a[dept] ~ normal( abar , sigma ),
        abar ~ normal( 0 , 4 ),
        sigma ~ half_normal(0,1),
        b ~ normal(0,1)
    ), data=UCBadmit )

I got this error:

Syntax error in '/var/folders/xy/d1z300jj79j9swfc9hkg6v1h0000gq/T/Rtmpip9UOG/model-180f658fd6385.stan', line 2, column 18 to column 24, parsing error:
   -------------------------------------------------
     1:  data{
     2:      array[12] int reject;
                           ^
     3:      array[12] int applications;
     4:      array[12] int admit;
   -------------------------------------------------

Expected a new identifier but found reserved keyword 'reject'.

make: *** [/var/folders/xy/d1z300jj79j9swfc9hkg6v1h0000gq/T/Rtmpip9UOG/model-180f658fd6385.hpp] Error 1

Error: An error occured during compilation! See the message above for more information.

I think the reject column in the UCBadmit data should be remaned to avoid this.

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