ploting mutlple graphs on the same plot with models output
up vote
0
down vote
favorite
I am R novice but need to it for my data analysis.
I want to plot multiple line charts from different locations (under the same study) on the same plot. My data frames are results of non-linear random effects models.
Below is the model output and plot. Now I have four different locations (1 to 4) and I need to plot on the same graph for comparison.
{r}
Location1.model<- glmer(Completeness ~ Weeks + I(Weeks*Weeks) + (1|street), data = location.1, family = binomial())
summary(D1.model)
Weeks_Num <- 1:165
Time.effect <- fixef(D1.model)[1] + fixef(D1.model)[2]*Weeks_Num + fixef(D1.model)[3]*Weeks_Num*Weeks_Num
Time.probs <- inv.logit(Time.effect)
plot(Time.probs~Weeks_Num, pch=".", col="blue", type="l", xlim=c(0,175), ylim=c(0,1))
plo1
Please help
r
New contributor
add a comment |
up vote
0
down vote
favorite
I am R novice but need to it for my data analysis.
I want to plot multiple line charts from different locations (under the same study) on the same plot. My data frames are results of non-linear random effects models.
Below is the model output and plot. Now I have four different locations (1 to 4) and I need to plot on the same graph for comparison.
{r}
Location1.model<- glmer(Completeness ~ Weeks + I(Weeks*Weeks) + (1|street), data = location.1, family = binomial())
summary(D1.model)
Weeks_Num <- 1:165
Time.effect <- fixef(D1.model)[1] + fixef(D1.model)[2]*Weeks_Num + fixef(D1.model)[3]*Weeks_Num*Weeks_Num
Time.probs <- inv.logit(Time.effect)
plot(Time.probs~Weeks_Num, pch=".", col="blue", type="l", xlim=c(0,175), ylim=c(0,1))
plo1
Please help
r
New contributor
Possible duplicate of R error "could not find function 'multiplot' " using Cookbook example
– Dan Woodrich
16 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am R novice but need to it for my data analysis.
I want to plot multiple line charts from different locations (under the same study) on the same plot. My data frames are results of non-linear random effects models.
Below is the model output and plot. Now I have four different locations (1 to 4) and I need to plot on the same graph for comparison.
{r}
Location1.model<- glmer(Completeness ~ Weeks + I(Weeks*Weeks) + (1|street), data = location.1, family = binomial())
summary(D1.model)
Weeks_Num <- 1:165
Time.effect <- fixef(D1.model)[1] + fixef(D1.model)[2]*Weeks_Num + fixef(D1.model)[3]*Weeks_Num*Weeks_Num
Time.probs <- inv.logit(Time.effect)
plot(Time.probs~Weeks_Num, pch=".", col="blue", type="l", xlim=c(0,175), ylim=c(0,1))
plo1
Please help
r
New contributor
I am R novice but need to it for my data analysis.
I want to plot multiple line charts from different locations (under the same study) on the same plot. My data frames are results of non-linear random effects models.
Below is the model output and plot. Now I have four different locations (1 to 4) and I need to plot on the same graph for comparison.
{r}
Location1.model<- glmer(Completeness ~ Weeks + I(Weeks*Weeks) + (1|street), data = location.1, family = binomial())
summary(D1.model)
Weeks_Num <- 1:165
Time.effect <- fixef(D1.model)[1] + fixef(D1.model)[2]*Weeks_Num + fixef(D1.model)[3]*Weeks_Num*Weeks_Num
Time.probs <- inv.logit(Time.effect)
plot(Time.probs~Weeks_Num, pch=".", col="blue", type="l", xlim=c(0,175), ylim=c(0,1))
plo1
Please help
r
r
New contributor
New contributor
edited 16 hours ago
New contributor
asked 16 hours ago
MwalimuMM
11
11
New contributor
New contributor
Possible duplicate of R error "could not find function 'multiplot' " using Cookbook example
– Dan Woodrich
16 hours ago
add a comment |
Possible duplicate of R error "could not find function 'multiplot' " using Cookbook example
– Dan Woodrich
16 hours ago
Possible duplicate of R error "could not find function 'multiplot' " using Cookbook example
– Dan Woodrich
16 hours ago
Possible duplicate of R error "could not find function 'multiplot' " using Cookbook example
– Dan Woodrich
16 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
multiplot or grid.arrange would do the trick. Here is a thread were their use is discussed.
R error "could not find function 'multiplot' " using Cookbook example
This is a repeated topic, in the future try to search this site for a similar thread- many already exist for multipane plotting.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
multiplot or grid.arrange would do the trick. Here is a thread were their use is discussed.
R error "could not find function 'multiplot' " using Cookbook example
This is a repeated topic, in the future try to search this site for a similar thread- many already exist for multipane plotting.
add a comment |
up vote
0
down vote
multiplot or grid.arrange would do the trick. Here is a thread were their use is discussed.
R error "could not find function 'multiplot' " using Cookbook example
This is a repeated topic, in the future try to search this site for a similar thread- many already exist for multipane plotting.
add a comment |
up vote
0
down vote
up vote
0
down vote
multiplot or grid.arrange would do the trick. Here is a thread were their use is discussed.
R error "could not find function 'multiplot' " using Cookbook example
This is a repeated topic, in the future try to search this site for a similar thread- many already exist for multipane plotting.
multiplot or grid.arrange would do the trick. Here is a thread were their use is discussed.
R error "could not find function 'multiplot' " using Cookbook example
This is a repeated topic, in the future try to search this site for a similar thread- many already exist for multipane plotting.
answered 16 hours ago
Dan Woodrich
9116
9116
add a comment |
add a comment |
MwalimuMM is a new contributor. Be nice, and check out our Code of Conduct.
MwalimuMM is a new contributor. Be nice, and check out our Code of Conduct.
MwalimuMM is a new contributor. Be nice, and check out our Code of Conduct.
MwalimuMM is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343733%2fploting-mutlple-graphs-on-the-same-plot-with-models-output%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Possible duplicate of R error "could not find function 'multiplot' " using Cookbook example
– Dan Woodrich
16 hours ago