Problem mit dem Statistikprogramm "R"?
Hallo zusammen,
ich muss gerade eine Hausarbeit schreiben und verwende dazu das Programm R.
Mein Problem ist dass die Ausführung des T - Tests nicht funktioniert
Wenn ich den Befehl eingebe erscheint folgende Meldung.
> t.test(Spinnen~Probestelle, paired=TRUE, data=Biodiversitaet)
Fehler in t.test.formula(Spinnen ~ Probestelle, paired = TRUE, data = Biodiversitaet) :
cannot use 'paired' in formula method
> t.test(Herbivorie ~ Baumart, paired=FALSE, data=Neophyt)
Fehler in t.test.formula(Herbivorie ~ Baumart, paired = FALSE, data = Neophyt) :
cannot use 'paired' in formula method
Ich habe schon viel recherchiert aber ich komme einfach nicht drauf was ich falsch mache.
Es wäre nett wenn mir jemand helfen könnte.
1 Antwort
If paired is TRUE then both x and y must be specified and they must be the same length. Missing values are silently removed (in pairs if paired is TRUE). If var.equal is TRUE then the pooled estimate of the variance is used. By default, if var.equal is FALSE then the variance is estimated separately for both groups and the Welch modification to the degrees of freedom is used.
https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/t.test
D.h. du kannst paired = TRUE nur verwenden, wenn du ausdrücklich x und y spezifizierst. Und das ist letztlich die Aussage der Fehlermeldung.
Ansonsten wäre es sinnvoll, mehr von deinem R-Script zu zeigen.