Writing fees depend on the nature of the project... how large it is, how much internal work is involved, e.g., if a manuscript is to be ghostwritten "from scratch," and whether the manuscript needs to be book doctored, advance edited, edited, or just proofread.
Page length is another factor.
If a work is non-fiction and I am asked to include research, I account for this time.
I like to quote a flat rate fee; however, if the project is short, often I will quote an hourly rate.
My goal is to produce quality work.
Often this requires experience as well as expertise; I take both factors into account when I set my quote.
I am very willing to negotiate long-term payment plans, even though I may have completed the project long before clients make the final payment.