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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:33:30+00:00 2026-06-04T05:33:30+00:00

I have the following object M , from which I need to extract the

  • 0

I have the following object M, from which I need to extract the fstatistic. It is a model generated by the function summaryC of a model generated by aovp, both functions from package lmPerm. I have tried hints for extracting values from normal linear models and from the functions in attr, extract and getElement, but without success.

Anybody could give me a hint?

> str(M)
List of 2
 $ Error: vegetation: NULL
 $ Error: Within    :List of 11
  ..$ NA           : NULL
  ..$ terms        :Classes 'terms', 'formula' length 3 Temp ~ depth
  .. .. ..- attr(*, "variables")= language list(Temp, depth)
  .. .. ..- attr(*, "factors")= int [1:2, 1] 0 1
  .. .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. .. ..$ : chr [1:2] "Temp" "depth"
  .. .. .. .. ..$ : chr "depth"
  .. .. ..- attr(*, "term.labels")= chr "depth"
  .. .. ..- attr(*, "order")= int 1
  .. .. ..- attr(*, "intercept")= int 1
  .. .. ..- attr(*, "response")= int 1
  .. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
  ..$ residuals    : Named num [1:498] -46.9 -43.9 -46.9 -38.9 -41.9 ...
  .. ..- attr(*, "names")= chr [1:498] "3" "4" "5" "6" ...
  ..$ coefficients : num [1:4, 1:4] -2.00 -1.00 -1.35e-14 1.00 2.59 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:4] "depth1" "depth2" "depth3" "depth4"
  .. .. ..$ : chr [1:4] "Estimate" "Std. Error" "t value" "Pr(>|t|)"
  ..$ aliased      : Named logi [1:4] FALSE FALSE FALSE FALSE
  .. ..- attr(*, "names")= chr [1:4] "depth1" "depth2" "depth3" "depth4"
  ..$ sigma        : num 29
  ..$ df           : int [1:3] 4 494 4
  ..$ r.squared    : num 0.00239
  ..$ adj.r.squared: num -0.00367
  ..$ **fstatistic**   : Named num [1:3] 0.395 3 494
  .. ..- attr(*, "names")= chr [1:3] "value" "numdf" "dendf"
  ..$ cov.unscaled : num [1:4, 1:4] 0.008 -0.002 -0.002 -0.002 -0.002 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:4] "depth1" "depth2" "depth3" "depth4"
  .. .. ..$ : chr [1:4] "depth1" "depth2" "depth3" "depth4"
  ..- attr(*, "class")= chr "summary.lmp"
   - attr(*, "class")= chr "listof"

there it goes a reproducible example to play with:

Temp=1:100
depth<- rep( c("1","2","3","4","5"), 100)
vegetation=rep( c("1","2"), 50)
df=data.frame(Temp,depth,vegetation)

M=summaryC(aovp(Temp~depth+Error(vegetation),df, perm=""))
  • 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-04T05:33:31+00:00Added an answer on June 4, 2026 at 5:33 am

    as the str output from your example shows, M is a list of two lists, the second one contains what you want. Hence list extraction via [[ does the trick:

    > M[[2]][["fstatistic"]]
       value    numdf    dendf 
      0.3946   3.0000 494.0000 
    

    If this is not what you want, please comment.

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

Sidebar

Related Questions

I have the following code which copies property values from one object to another
I have the following problem: I need to get a ConfigurationSection - object from
I have a DLL from which I need to P/Invoke the following C method:
I have the following script which I need to combine together somehow. Each function
I have following object structure, deseralized from XML (WS): <ns2:Category> <ns2:CategoryId>800003</ns2:CategoryId> <ns2:CategoryName>Name1</ns2:CategoryName> <ns2:Categories> <ns2:Category>
I have the following code that loads a user's Active Directory DirectoryEntry object from
I have the following query: SELECT o.id,o.name FROM object o WHERE ( o.description LIKE
I need some help defining the following object hierarchy/ database relationship in Hibernate From
I have a load of XSLT from a third party which i need to
I have the following script defining a tzinfo object: import time from datetime import

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.