The definition normally given for adverb is similar to the following one:
a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word-group
Preposition is normally described using the following words:
a word governing, and usually preceding, a noun or pronoun and expressing a relation to another word or element in the clause
The NOAD, for which twice is only an adverb, uses the following examples for twice:
She had been married twice.
The tablets should be taken twice a day.
I'm twice your age.
an engine twice as big as the original
The same dictionary reports the following examples of prepositions:
the man on the platform
she arrived after dinner
What did you do it for
Looking at the examples, "she arrived after dinner" seems similar to "I am twice your age"; using the definition of preposition, I could say that twice express a relation between I and your age, in the same way after expresses a relation between she and dinner.
The man on the platform seem similar to the man twice your age; if on is a preposition on the first phrase, twice should be a preposition in the second one.
Giving the definitions for preposition, and adverb, it seems I could use classify a word as adverb, or preposition.
Are there more restrictive criteria, to distinguish a preposition from an adverb? Is the relation between two words used to be define preposition restricted to a specific set of relations? For example, on in the man on the platform is a preposition because the relation between man and platform is a specific one.