Skip to content

Error() model is singular - what does that mean

8 messages · zetwal, Jessica Streicher, Bert Gunter +1 more

#
Hello

I have some test data that looks like that from a within subject experiment.
Subject   Task-Kind    Data-Kind   Time-Taken   Correct
1    A      Data1     5   1
1    A      Data1     3   0
1    A      Data1     1   1
1    A      Data2     8   1
1    A      Data2     7   0
1    A      Data2     5   0
1    A      Data3     2   1
1    A      Data3     7   0
1    A      Data3    5    0
1    A      Data3    6    0
1    B      Data1     3   1
1    B      Data1     1   1
1    B      Data1     3   0
1    B      Data2     9   0
1    B      Data2     8   1
1    B      Data2     5  0
1    B      Data3     2   1
1    B      Data3     7   2
1    B      Data3    5    3
1    B      Data3    6    0
1    C      Data1     3   1
1    C      Data1     1   1
1    C      Data1     3   0
1    C      Data2     9   0
1    C      Data2     8   1
1    C      Data2     5  0
1    C      Data3     2   1
1    C      Data3     7   2
1    C      Data3    5    3
1    C      Data3    6    0
2    A      Data1     5   1
2    A      Data1     3   0
2    A      Data1     1   1
2    A      Data2     8   1
2    A      Data2     7   0
2    A      Data2     5   0
2    A      Data3     2   1
2    A      Data3     7   0
2    A      Data3    5    0
2    A      Data3    6    0
2    B      Data1     3   1
2    B      Data1     1   1
2    B      Data1     3   0
2    B      Data2     9   0
2    B      Data2     8   1
2   B      Data2     5  0
2    B      Data3     2   1
2    B      Data3     7   2
2    B      Data3    5    3
2    B      Data3    6    0
2    C      Data1     3   1
2    C      Data1     1   1
2    C      Data1     3   0
2    C      Data2     9   0
2    C      Data2     8   1
2    C      Data2     5  0
2    C      Data3     2   1
2    C      Data3     7   2
2    C      Data3    5    3
2    C      Data3    6    0
.
.
.

some notes:
there are 20 subjects
there are 5 different kinds of tasks
There are 5 different kinds of data
and there are several different variations for a certain kind of task and
kind of data which is why for Subject = 1   Task-Kind=A  and Data-Kind=Data1 
we have 3 different results.

The measured parameters are time to complete the task and whether it was
correct or not (0 implies correct and 1 implies not correct)

I am computing the anova as follows:
aov.ex =
aov(Correct~Task-Kind*Data-Kind+Error(Subject/(Task-Kind*Data-Kind)),data=allDataRaw.xp)

since I want to see how the result is affected by the different kinds of
data as well as the the kind of task and I get a warning message saying:
Error() model is singular

I would be very grateful if someone could please tell me what does this
mean.
Thanks
Pascal

--
View this message in context: http://r.789695.n4.nabble.com/Error-model-is-singular-what-does-that-mean-tp4635103.html
Sent from the R help mailing list archive at Nabble.com.
#
Just looking at it i would try renaming Task-Kind, Data-Kind an Time-Taken
Those are ambiguous in the Formula.

"Task-Kind" vs "Task" - "Kind"

Though that might not be the error at hand :)
On 02.07.2012, at 14:15, zetwal wrote:

            
#
Also, try googling for  - R model is singular - , there seem to have been a lot of people with that particular error.
On 02.07.2012, at 14:56, Jessica Streicher wrote:

            
#
Hi Jessica

Thanks for the replies. I was getting a bit confused at the answers when I
googled for it. So I thought maybe it would be better if I present my
specific test case (could be i'm doing something very wrong as I am quite
new to this thing)

Also, there are no dashes in my real names, I only have Data and Task for
example. I've changed the names just to make the labels more meaningful when
I was posting.

--
View this message in context: http://r.789695.n4.nabble.com/Error-model-is-singular-what-does-that-mean-tp4635103p4635178.html
Sent from the R help mailing list archive at Nabble.com.
#
On changing the parameters; using only Error(User), I don't get any warning
on singularity. However most tutorials I saw seemed to point to using
Error(User/(whatever i specified before))

Are there some rules which indicated when I should use only Error(User) and
Error(User/(...))

Thanks
Pascal

--
View this message in context: http://r.789695.n4.nabble.com/Error-model-is-singular-what-does-that-mean-tp4635103p4635181.html
Sent from the R help mailing list archive at Nabble.com.
#
On Jul 2, 2012, at 20:02 , zetwal wrote:

            
Not really, but if you don't have a completely balanced User*A*B design, then aov() likely gets in trouble. 

If I understand your original message correctly, you have 9 observations per subject but 5 levels of the within-subject factors, so that with N subjects you have 9N observations but the error model tries to fit 25N parameters and this is what triggers the error message. With just the Error(User) term, the model has just N parameters and things are fine, although I suppose you get the A*B effects tested in both strata.