The story takes place somewhere in the Daybreakers universeNot the movies but the story of the original novel itself. As the original story details Robert Neville has so many Moral Event Horizon moments he has numerous mental breakdowns throughout the 1st 2/3rds of the story. So it can be assumed that by the storys pivotal end Neville doesn't know what is truly fiction in his own mind and reality. So by this it can be assumed that it could be possible that I Am Legend could be taking place in a alternate New York in the universe of the vampire film Daybreakers. Basically it goes like this, events that made Vampire!Humans in Daybreakers and Legend are fairly similar how ever the storys view splits after this. In one Vampires become like a overwhelming Zombie Apocalypse with only Neville able to save us all while the other is where while humanity becomes Vampires society has changed very little. People still go to work, raise families, drive cars, and make and watch FOX News. Basically the world and civilization in fact hasn't collapsed only "changed". However Neville (due to his mental snap(s)) doesn't see this and is now only a raving lunatic driven by his own hatred and fear of the new Human!Vampire society. Essentially Neville is a Bigot in the most fantastical sense of the word. He most likely killed his own family out of fear they would become "freaks" like the rest of society. Afterwards Neville began to suffer from severe survivors guilt and mental exhaustion in where he began to break or disassociate himself from reality. After this Neville built a delusional fantasy world in were Neville is a savior of sorts in where Vampires are zombie like monsters and he is the (seemingly) last sane and non mutated man left on a ruined earth. However in actuality Neville is nothing more now then a serial killer and madman who has probably killed more people then anyone else in New York's history thus making him a Legend. Although this does leave some questions that the novel would leave somewhat unanswered but can be explained such as...
The hero's daughter is not immune because she wasn't his.Pity his wife cheated on him. (In the Price version at least.)
The alternate ending is the real ending.The ending is really the version of the story that was passed down through the centuries after mankind completely recovers, thus the name of the movie.