Displaying 3 results from an estimated 3 matches for "tymek".
Did you mean:
tomek
2009 Jul 08
1
Passing arguments to with()
Hi,
I've been wondering how to write a function that will produce results
from multiple tests (eg. paired t-tests) for all or several variables
in some data frame. I'd like it to do t-test for each variable ('x')
in 'data' by 'y'. I'm stuck in here:
function(data,y) {
for (x in names(data)) {
with(data, t.test(x~y))
}}
How to tell 'with' that
2009 Jul 09
1
Strange t-test error: "grouping factor must have exactly 2 levels" while it does...
Hi,
Could anyone tell me what is wrong:
> length(unique(mydata$myvariable))
[1] 2
>
and in t-test:
(...)
Error in t.test.formula(othervariable ~ myvariable, mydata) :
grouping factor must have exactly 2 levels
>
I re-checked the code and still don't get what is wrong.
Moreover, there is some strange behavior:
/1 It seems that the error is vulnerable to NA'a, because it
2009 Jul 09
2
How to Populate List
...me from this list (Curley, Jane)
38. Re: functions to calculate t-stats, etc. for lm.fit objects?
(Marc Schwartz)
39. Formatting a Table (cvandy)
40. Two-way ANOVA gives different results using anova(lm()) than
doing it by hand (Lars Bergemann)
41. Passing arguments to with() (Tymek Wo?od?ko)
42. Re: functions to calculate t-stats, etc. for lm.fit objects?
(Whit Armstrong)
43. #INCLUDE (Idgarad)
44. Re: Reading from Google Docs (Duncan Murdoch)
45. Re: #INCLUDE (Godmar Back)
46. Comparing GAMMs (Paul Simonin)
47. Re: Passing arguments to with() (Duncan Murdoc...