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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:26:15+00:00 2026-05-31T01:26:15+00:00

Apologies if this has been answered before, but I find it very difficult to

  • 0

Apologies if this has been answered before, but I find it very difficult to get answers for my R problems!

My problem relates to how I can store the results of multiple anovas in a useful way.

I am performing anovas on subsets of a data frame using ‘aov’, comparing two data frames at a time, using the below function:

doAnova = function(first, second) {
    aov(number ~ factor1+factor2, data=rbind(first, second))
}

This is used to compare each subset against a ‘base’ case, to check for significant differences. To perform this over the multiple datasets, I use it in a loop:

for (name in names) {
    result = summary(doAnova(base,subject))
}

I want this result to be stored in a data frame with each row containing the ‘name’ and the ‘result’ values.

So far I have tried both storing lists and vectors of the names and results, and then trying to create data frames from those, but haven’t managed to get this right.

I know this is probably pretty simple, but anyone able to help solve this?

Thanks

  • 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-31T01:26:16+00:00Added an answer on May 31, 2026 at 1:26 am

    You seem to be doing an end-around on the more standard practice of analyzing all the data and then doing post-hoc testing to examine subset comparisons. Statisticians would generally consider this to be unprincipled data dredging. Also the help page for aov says :

    "Note

    aov is designed for balanced designs, and the results can be hard to interpret without balance: beware that missing values in the response(s) will likely lose the balance."

    So I think you should be coding your subsets with identifying factor variables and using the facilities that R provides for analysis of unbalanced designs, namely lm . Only after you have examined the estimated effects in a global fashion should you be turning to appropriate post-hoc tests that allow a principled correction for the multiple comparisons issues.

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

Sidebar

Related Questions

Apologies if this has been answered before but I can't find a reference. I
Apologies if this has been asked before (I couldn't find the answer anywhere), but
Many apologies if this has been answered, but I have been unable to find
Apologies if this question has been answered before. Though the answers I've seen look
Apologies if this has been answered elsewhere, but I have yet to find a
Apologies if this has been answered before (I couldn't find the answer when I
My apologies if this has been answered before or is obvious...did some searching here
Apologies if this has been answered already, but I'm going through the posts here
I apologise if this has been asked before but I can't find the info
Apologies if this has been answered before. I've been trying to construct an XPath

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.