Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9130541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:58:57+00:00 2026-06-17T07:58:57+00:00

I conducted an analysis using a logit model and now want to do the

  • 0

I conducted an analysis using a logit model and now want to do the same using a probit model. Can anyone please turn this winbugs logit model into a winbugs probit model?

model
 {
 for (i in 1:n) {
 # Linear regression on logit
 logit(p[i]) <- alpha + b.sex*sex[i] + b.age*age[i]
 # Likelihood function for each data point
 frac[i] ~ dbern(p[i])
 }
 alpha ~ dnorm(0.0,1.0E-4) # Prior for intercept
 b.sex ~ dnorm(0.0,1.0E-4) # Prior for slope of sex
 b.age ~ dnorm(0.0,1.0E-4) # Prior for slope of age
 }
 Data
 list(sex=c(1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0,    1,
  1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1,     1, 1, 0,
  0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0,   1, 1, 1,
  0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1),
  age= c(69, 57, 61, 60, 69, 74, 63, 68, 64, 53, 60, 58, 79, 56, 53, 74, 56, 76, 72,
  56, 66, 52, 77, 70, 69, 76, 72, 53, 69, 59, 73, 77, 55, 77, 68, 62, 56, 68, 70, 60,
  65, 55, 64, 75, 60, 67, 61, 69, 75, 68, 72, 71, 54, 52, 54, 50, 75, 59, 65, 60, 60,
  57, 51, 51, 63, 57, 80, 52, 65, 72, 80, 73, 76, 79, 66, 51, 76, 75, 66, 75, 78, 70,
  67, 51, 70, 71, 71, 74, 74, 60, 58, 55, 61, 65, 52, 68, 75, 52, 53, 70),
  frac=c(1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1,   1, 0,
  1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0,    1, 1, 1,
  1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1,   1, 1, 1,
  1, 0, 1, 1, 0, 0, 1, 0, 0, 1),
  n=100)
  Initial Values
  list(alpha=0, b.sex=1, b.age=1)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:58:58+00:00Added an answer on June 17, 2026 at 7:58 am

    WinBUGS accepts multiple types of link functions (see page 15 in the WinBUGS manual). For a probit model, change your linear regression equation to:

    probit(p[i]) <- alpha + b.sex*sex[i] + b.age*age[i]
    

    I would recommend you center the age variable, otherwise you may well run into some convergence problems, so something like:

    probit(p[i]) <- alpha + b.sex*sex[i] + b.age*(age[i] - mean(age[]))
    

    Alternatively, for a probit model (if the probit functions gives you some trap errors) you could use the phi standard normal cdf function:

     p[i] <- phi(alpha + b.sex*sex[i] + b.age*(age[i] - mean(age[])))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I conducted a bayesian analysis and obtained some plots in winbugs. Does any one
I am interested in how the reverse-engineering on java bytecode is conducted. Can anyone
I conducted a Bayesian analysis by running Winbugs from R and derived the fitted
I'm in a bit of a doubt about this subject. Situation: I have conducted
I am unsure of whether this is possible and have conducted a handful of
I'm a college student and this is a homework my algorithm analysis professor passed
General Overview: The function below spits out a random ID. I'm using this to
I'm using the LingPy 1.0.1 library for Python 2.7, attempting to conduct Cognate Analysis
I have created a search page using parametric filtering conducted on change of checkbox
I am using RDLC report in Win-form. I want to add the Below Page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.