1. I prefer to go there by bus.

2. I prefer going there by bus.
3. I prefer going there to staying at home.
4. I prefer to go there to stay at home.
5. I prefer to go there rather than to stay at home.
6. I prefer to go there rather than stay at home.
7. I prefer going there rather than staying at home.
--------------------------
Which sentences are not grammatical? Would you check all the sentences above? Thank you so much... Have a great weekend.

All of the sentences provided are grammatically correct.

To determine which sentences are grammatical, we need to analyze each sentence and identify any errors. Let's go through each sentence one by one:

1. I prefer to go there by bus.
This sentence is grammatically correct. There are no errors.

2. I prefer going there by bus.
This sentence is also grammatically correct. Instead of using the infinitive form "to go," it uses the gerunds form "going." Both forms are possible in this context.

3. I prefer going there to staying at home.
This sentence is grammatically correct. It correctly compares two actions using the gerund form "going" and the infinitive form "staying."

4. I prefer to go there to stay at home.
This sentence is also grammatically correct. It uses the infinitive form "to go" as well as the bare infinitive "stay." This structure is commonly used when comparing two actions.

5. I prefer to go there rather than to stay at home.
This sentence is grammatically correct. It uses the phrase "rather than" to compare two actions, and both actions are in the infinitive form.

6. I prefer to go there rather than stay at home.
This sentence is also grammatically correct. It eliminates the second "to" in "rather than to stay" and uses the infinitive form followed by a bare infinitive.

7. I prefer going there rather than staying at home.
This sentence is grammatically correct. It maintains the gerund form for both actions and correctly uses "rather than" to compare them.

In conclusion, all seven sentences are grammatically correct.

All are correct except #4.

You have a great weekend, too! =)