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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:21:28+00:00 2026-06-09T12:21:28+00:00

is there a way to generate a ccf plot in R using ccf but

  • 0

is there a way to generate a ccf plot in R using ccf but to allow it to only use negative lags? i tried changing lag.max but it still retains a symmetric shape.

EDIT: to clarify, i need lags that are larger than the standard default that gets plotted (i think the default is +-34)

  • 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-09T12:21:30+00:00Added an answer on June 9, 2026 at 12:21 pm

    I followed one of the examples in ?ccf. I created a ccf object then looked at its structure, I don’t plot it yet by using plot=F:

    >xccf=ccf(mdeaths,fdeaths,ylab="wtf!",lag.max=200, plot=F)
    >str(xccf)
    

    The str commmand shows that there is a there is component call lag that are a sequence of some sort, look at it with:

        > xccf$lag
    , , 1
    
                  [,1]
      [1,] -5.91666667
      [2,] -5.83333333
      [3,] -5.75000000
      [4,] -5.66666667
      [5,] -5.58333333
     ...       ...    ...
    [141,]  5.75000000
    [142,]  5.83333333
    [143,]  5.91666667
    

    The length of the lags will be the lag.max or the number of observations in the shorter data, whichever is lower. For this example data I set max.lag to be 200 but since there is not enough data to comput that many you only get 143. If you want only the negative ones the first 71 are they. So I pass which lags into the square brackets to subset to those. Then call plot on the thing.

    plot(xccf[xccf$lag[1:71],])

    which gives this plot:

    OOHH aahhhh!

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

Sidebar

Related Questions

Is there a way to generate random letters in Python (like random.randint but for
Is there a way to generate a dictionary initializer using the C# CodeDom? Are
Is there any way to generate a warning in VS2008 for unused using statements?
Is there a way to generate an HTML file using a PHP script which
Is there a way to generate a number number between two limits without using
Is there any way to generate a ToString() using Visual Studio 2010? I really
Is there a way to generate a subset of methods in the controller using
I know it is not recommended but is there a way to generate/modify an
Is there a way to generate MD5 Hash string of type varchar(32) without using
Is there a way to generate a diff in mercurial that only gives 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.