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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:49:34+00:00 2026-05-31T19:49:34+00:00

In R I have the following matrix (each row represents a bootstrap 95% confidence

  • 0

In R I have the following matrix (each row represents a bootstrap 95% confidence interval generated from the same sample data):

       low   high
[1,]   22.2  25.5
[2,]   23.1  25.9
[3,]   23.4  26.1
...

I know the true population mean of the data, it’s 23.3. So the first two include the true mean but the third does not.

In R, I want to run a for loop i through nrow(matrix) times, each i checking whether or not the true population mean of the data is in that particular interval, then return a column vector of height nrow(matrix) of TRUE if the interval contains the true mean, and FALSE otherwise.

How could I do this?

  • 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-31T19:49:35+00:00Added an answer on May 31, 2026 at 7:49 pm

    You can simply use the inequality operators directly on the matrix columns. So I would have simply done:

    > cbind( mat[,1] <= 23.3 & mat[,2] >= 23.3 )
    
          [,1]
    [1,]  TRUE
    [2,]  TRUE
    [3,] FALSE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several blocks of the following code that each use there own matrix.
I have a matrix of data (with row names and column names). I would
I have a ssrs report . There is a matrix with 2 row groups(from
Say I have the following matrix: A = randi(10, [6 3]) 7 10 3
I have a matrix like the following (arbitrary cols/rows): 1 0 0 0 0
I'm doing the following code that construct a distance matrix between each point and
The thing is I have to create a 2D matrix in php where each
Say I have the following matrix which is vertical : {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} And I want
I have 100 models (matrices), where each matrix's size is 4X3. Each of the
I have the following sparse matrix that contains O(N) elements boost::numeric::ublas::compressed_matrix<int> adjacency (N, N);

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.