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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:11:00+00:00 2026-06-06T07:11:00+00:00

Hi sorry still learning here and slow to learning code arguments. Just wondering could

  • 0

Hi sorry still learning here and slow to learning code arguments.

Just wondering could anyone explain what a certain part of a function means:

x = sum(abs(apply(embed(y, 4), 1, prod)))

It does give the following on paper:

#sum(y|{j}|*y|{j-1}|*y|{j-2}|*|y{j-3}|)

I am wondering what does the 1 do? as I think the (y, 4) means y with y plus 3 lags and prod I know is product

this specific function was wrote for be by I am trying to modify it to equal:

#sum((|y{j}|^3/2)*(|y{j-1}|^3/2)*(|y{j-2}|^3/2)*(|y{j-3}|^3/2))

So basically I am wondering should my modified function to raise the y’s to ^3/2 should I compute:

x = sum(abs(apply(embed((y^3/2), 4), 1, prod)))

or to:

x = sum(abs(apply(embed(y, 4), 3/2, prod)))

or another?

Any help?

Thank you in advance for your input

  • 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-06T07:11:02+00:00Added an answer on June 6, 2026 at 7:11 am

    1 is part of the apply function of argument called MARGIN. This is why I advocate specifying argument names. Anyway, apply function will “loop” through rows (1) or columns (2) of data frames, arrays, matrices… An expression or an evaluated object should be passed as X or if you prefer your functions bare, the first argument. If you want to raise y by some amount, you will have to do it like you’ve showed in one of the lines: y^(3/2).

    In other words, this command will sum all elements across rows:

    apply(X = my.object, MARGIN = 1, FUN = sum)
    

    or across columns:

    apply(X = my.object, MARGIN = 2, FUN = sum)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry I'm still a noob and just learning to program as I go and
Sorry I'm new here and my code will probably not be properly displayed... how
I'm still a working on learning RSpec so I'm sorry if completely overlooked something...
Sorry if it's too obvious for you. I'm still learning objetive-c and proper design
I have just started learning PHP, and here's my first doubt... Both of these
first, sorry about my english, i still learning. I writing Python module for my
Sorry for all the dumb jquery questions I'm still learning and find this to
I'm still learning Android Development so sorry if this question seems stupid but I'm
Sorry still learning Yii so newbie question. I have a site im converting over
I'm sorry if this is a very simplistic question but I'm still learning the

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.