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 3599222
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:20:28+00:00 2026-05-18T20:20:28+00:00

I am trying to analyze some probability data with R. The data I have

  • 0

I am trying to analyze some probability data with R. The data I have gives the frequency of certain outcomes (A and B) for a given probability p and what I want is a model that will allow me to estimate p from only the frequency data.

Right now I am just running a linear regression (something like lm(p ~ A + B)) which works more or less but I know that this is not the “right way” to do it. In particular, my current model will, for some values of A or B, return values that do not lie within the interval [0, 1], i.e. that are not valid for a probability.

I am pretty sure there is a way to do this, but I can’t for the life of me figure out what the model was called or how to run it in R. Can anybody give me a hint?

  • 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-05-18T20:20:28+00:00Added an answer on May 18, 2026 at 8:20 pm

    You cannot just run lm(p ~ A + B) as there is no model relating your count variables A and B with the probabilities: lm() fits a linear regression to model an unbounded real variable as a function of a linear combination of real variables (where you can substitute count variables).

    The easiest model for probabilities is a logistic regresion which uses a logistic function to make from unbounded real values to the bounded interval [0,1]. You can fit logistic regression in R using glm() as well as a number of add-on packages for special cases, see e.g. this rseek.org search for logistic regression.

    Also, CrossValidated is a good site for modeling questions such as this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to analyze some probability data with R. The data I have
I'm trying to analyze some UTF-8 encoded documents in a way that recognizes different
I have some vectors of experimental data that I need to massage, for example:
I'm trying to analyze some running times for various methods in my default.aspx.cs page.
I am trying to analyze a JVM crash that is occuring inconsistently. I get
I'm trying to get LinqPad use my dbml model so I could analyze a
I'm currently trying to analyze large data sets (40 000+ data points) with matlab.
I am trying to analyze what happened in a software development effort. I have
I am attempting to write a firefox addon that will analyze the displayed page
I'm trying to optimize some of my selects using the explain analyze, and I

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.