This family were still in Riccarton in 1851, while I was at the LHU
today I used the Ayrshire 1851 census index and found the following:
JOHN MCKELVIE AGED 42
AGES MCKELVIE AGED 34
FRANCIS MCKELVIE AGED 9
AGNES MCKELVIE AGED 3
ELIZABETH MCKELVIE AGED 7M
You may want to check for them in the 1861 census [as well as the 1851]
which has been indexed by East Ayrshire FHS. You can buy it from them or
ask the local historian for a lookup.
There is a Pedigree Resource File on this John McKelvie by Sue Collins
from Vancouver who has John and Agnes in her tree. She lists the birth
of Agnes and her parents and has the same date of birth for John in
Kilmarnock in 1807 that you have.