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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:25:53+00:00 2026-05-31T07:25:53+00:00

I am defining the basic matrix: 1 2 3 4 5 6 7 8

  • 0

I am defining the basic matrix:

1         2         3         4
5         6         7         8

As follows:

PROC IML;
    RESET NOPRINT;
    matrix = {1 2 3 4, 5 6 7 8};
EXIT:

I’m looking to resample each row with replacement so we generate matrices like:

1         3         4         2
6         6         5         5

and

1         1         3         2
5         6         6         8

How can this be done?

Note that if you’re not aligned with stats, to resample with replacement means if we have a set of data:

{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

and wish to resample with replacement, we randomly pick 10 objects from the set to form a new 10-element set, and we’re allowed to pick an element more than once (so the set {1, 1, 1, 1, 1, 1, 1, 1, 1, 1} is just as likely as any other.

  • 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-31T07:25:54+00:00Added an answer on May 31, 2026 at 7:25 am

    I’m not great with IML, but the most efficient approach would be to generate a new matrix that has in each row an integer in 1,...,k where k is the number of variables (4 in your case). You can then use this matrix to reshuffle the elements of your existing matrix.

    This approach is shown in this blog post, except you’ll have to modify it to work on your whole matrix — in his code, the input is a row vector.

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

Sidebar

Related Questions

Basically I have a masterpage defining the basic layout of the website. What I
This is a basic question about what options are available for defining the scope
I am looking for a way to create a basic python object which I
What are the basic ways of defining reusable objects in Javascript? I say reusable
Imagine I have a basic.xsd file defining some attribute myAttribute in some element myElement
Defining custom components in Facelets is easy and quick but there's one thing I
Defining a form in my Play! controller when the compiler spit out this weird
When defining parameter type that is e.g. in System.Data you have no intellisense and
Atleast defining my problem is simple... I have a Input control (Text) and a
When defining a custom operator from the limited set of single-character operators that can

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.