[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] orgmode and anova

From: Kyle Andrews
Subject: Re: [O] orgmode and anova
Date: Fri, 22 Apr 2016 01:56:33 +0000

If you wanted to fit a linear regression model with R, you could do so with the lm function. Calling anova on the output of the regression would give you a regression anova table.

model <- lm(delivered_seeing ~ zeenith_seeing, data = ""> anova(model)

You would need non-zero residuals for that to be useful of course.

Otherwise, you need to stack your *_seeing columns into one column with another column saying which kind of seeing it was and then:

model.aov <- aov(seeing ~ factor(kind), data = "">

You could do the stacking in a number of ways. My favorite is to use the gather function in the tidyr package.

aov is just a wrapper around lm, so just take the same approach as before to get the ANOVA table. Hope that helps.

On Thu, Apr 21, 2016, 15:10 Uwe Brauer <address@hidden> wrote:

Using Kubuntu I just installed R and the following code works nicely

#+tblname: delsee
| airmass | zenith_seeing | delivered_seeing |
|     1.3 |          0.95 |        1.1119612 |
|     1.3 |           1.0 |        1.1704854 |
|     1.3 |           1.1 |        1.2875340 |
|     1.3 |           1.2 |        1.4045825 |
#+TBLFM: $3=$2*($1**0.6)

#+begin_src R :results output :var delsee=delsee

Does somebody know whether I could do an ANOVA, comparing these columns
(which does not make much sense, but this is not the point.

Any help is strongly appreciated.


Uwe Brauer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]