The phrase "you are losing your marbles" means that you are losing your mind. This phrase is thought to have been first used in a film titled, The Caine Mutiny Humphrey Bogart in which insanity was related to jiggling marbles. Find out more from http://www.phrases.org.uk/meanings/lose-your-marbles.html.
Slang term that implies that a person has lost their abilities to reason things out, rationally. For example; Joe: " I think I will go to that baby shower! Bob: "What??! Have you lost your marbles???!!" (In this case, followed by fits of uncontrollable laughter!)