Displaying 20 results from an estimated 5000 matches similar to: "How to plot effect of x1 while controlling for x2"
2012 Jun 06
3
Sobel's test for mediation and lme4/nlme
Hello,
Any advice or pointers for implementing Sobel's test for mediation in
2-level model setting? For fitting the hierarchical models, I am using
"lme4" but could also revert to "nlme" since it is a relatively simple
varying intercept model and they yield identical estimates. I apologize for
this is an R question with an embedded statistical question.
I noticed that a
2011 Sep 08
1
predict.rma (metafor package)
Hi
(R 2.13.1, OSX 10.6.8)
I am trying to use predict.rma with continuous and categorical variables. The argument newmods in predict.rma seems to handle coviariates, but appears to falter on factors. While I realise that the coefficients for factors provide the answers, the goal is to eventually use predict.rma with ANCOVA type model with an interaction.
Here is a self contained example
2013 Sep 26
2
Sums based on values of other matrix
Dear all,
I have a big problem:
- I got two matrices, A and B
- A shows identifies the value of B, however the values of B must be summed
- For instance,
1 1 2 2
2 2 1 1
gives matrix a
3 4 2 1
1 1 2 2
gives matrix b
Now the result for the value 1 would be
7
4
which are the rowsums of the values of matrix B given that matrix A has the value 1.
How can I do this automatically? I
2006 Nov 07
1
plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
Dear Uwe Ligges ,
I still can't finish it.
*> aa* #my data
x1 x2 y
5 0.05 6 4.4180
1 0.50 3 2.6979
4 0.50 9 2.9000
7 0.95 6 2.6230
8 0.95 6 2.9078
9 0.95 6 2.6727
3 1.40 3 2.4203
2 1.40 9 2.5329
6 1.85 6 2.4867
*> attach(aa)*
*> persp(x1,x2,y*
error in persp.default(x1, x2, y) : increasing 'x' and 'y' values expected
2013 Jan 22
6
plot two time series with different length and different starting point in one figure.
Hello,
I do have two different time series A and B, they are different in length and starting point. A starts in Jan, 2012 and ends in Dec, 2012 and B starts in March, 2012 and ends in Nov, 2012.
How can I plot those two series A and B in the same plot? I.E., from Jan. 2012 - Feb, 2012, it would have one data point from A and from Mar, 2012-Nov, 2012, it would have two data points from A and B,
2007 Apr 05
1
Indexing in anova summary output of the form: summary(aov(y ~ x1, Error = (x1/x2)))
Hi, there
I'm trying to get the value of the Mean Square from the ANOVA model
summary that comes from specifying the error term, and am wondering if
one can actually do this ( I know it's possible when using anova(lm)
objects and the like, but I'm having a tough time with it under this
framework). There does appear to be some indexing in the output of this
type, but perhaps not
2009 Jun 25
0
(Resolved) How to draw a line in plot when I know the start point(x1, y1) and end point(x2, y2)?
Thanks Jorge and Marc,
I drew the line using the function:
segments(x0, y0, x1, y1)
Lesandro
________________________________________________________________________
--- Em qui, 25/6/09, Marc Schwartz <marc_schwartz@me.com> escreveu:
De: Marc Schwartz <marc_schwartz@me.com>
Assunto: Re: [R] How to draw a line in plot when I know the start point(x1, y1) and end point(x2, y2)?
2012 Sep 11
2
how to qplot two x-axis x1:Farenheit x2:Celsius
Hi,
how can i plot two different x axis in a ggplot2 qplot?
I want to plot Farenheit and Celsius in one diagram.
x1:Farenheit x2:Celsius
kind regards,
--
Jonas Stein <news at jonasstein.de>
2009 Jun 25
2
How to draw a line in plot when I know the start point(x1, y1) and end point(x2, y2)?
Hello all,
How to draw a line in plot when I know the start point(x1,y1) and end point(x2,y2)? I need make this as additional information in the graph:
plot(wl2[[1]],wl2[[2]])
I think that is possible make this with the function abline(), is possible? I looked the function lines() too, but don't understand as make.
Thanks!
Lesandro
Veja quais são os assuntos do momento no Yahoo!
2012 Sep 11
1
Plotting every probability curve
I don't have a logistic regression model and am trying to generate
probability curves for all possible combinations of
the variables. My logit model has 5+ variables, and I want to draw curves
for every scenario.
See code below. When home_owner is 0 and 1, I want curves. The same goes
for all other variables categories, so that
I have permutations for all possible combinations.
I've
2009 Feb 08
5
glmmBUGS: logistic regression on proportional data
Hello,
I am trying to run a logistic regression with random effects on
proportional data in glmmBUGS. I am a newcomer to this package, and
wondered if anyone could help me specify the model correctly.
I am trying to specify the response variable, /yseed/, as # of successes
out of total observations... but I suspect that given the error below,
that is not correct. Also, Newsect should be a
2010 Sep 11
3
confidence bands for a quasipoisson glm
Dear all,
I have a quasipoisson glm for which I need confidence bands in a graphic:
gm6 <- glm(num_leaves ~ b_dist_min_new, family = quasipoisson, data = beva)
summary(gm6)
library('VIM')
b_dist_min_new <- as.numeric(prepare(beva$dist_min, scaling="classical", transformation="logarithm")).
My first steps for the solution are following:
range(b_dist_min_new)
2008 Feb 27
4
Error in cor.default(x1, x2) : missing observations in cov/cor
Hello,
I'm trying to do cor(x1,x2) and I get the following error:
Error in cor.default(x1, x2) : missing observations in cov/cor
A few things:
1. I've used cor() many times and have never encountered this error.
2. length(x1) = length(x2)
3. is.numeric(x1) = is.numeric(x2) = TRUE
4. which(is.na(x1)) = which(is.na(x2)) = integer(0) {the same goes for
is.nan()}
5. I also try
2017 Aug 09
3
Plotting log transformed predicted values from lme
Hi,
I am performing meta-regression using linear mixed-effect model with the
lme() function that has two fixed effect variables;one as a log
transformed variable (x) and one as factor (y) variable, and two nested
random intercept terms.
I want to save the predicted values from that model and show the log curve
in a plot ; predicted~log(x)
mod<-lme(B~log(x)+as.factor(y),
2004 Jul 19
10
How to compare X1 = X2 = ... = Xn?
Dear All,
I have a data frame with n columns: X1, X2, ., Xn. Now I want to create a
new column: if X1 = X2 = . = Xn, the value is 1; Otherwise, the value is 0.
How to do that in a quick way instead of doing (n choose 2) comparisons?
Thank you,
Frank
[[alternative HTML version deleted]]
2008 Feb 20
1
p-value for fixed effect in generalized linear mixed model
Dear R-users,
I am currently trying to switch from SAS to R, and am not very familiar with R yet, so forgive me if this question is irrelevant.
If I try to find the significance of the fixed factor "spikes" in a generalized linear mixed model, with "site" nested within "zone" as a random factor, I compare following two models with the anova function:
2004 Jan 08
3
Strange parametrization in polr
In Venables \& Ripley 3rd edition (p. 231) the proportional odds model
is described as:
logit(p<=k) = zeta_k + eta
but polr apparently thinks there is a minus in front of eta,
as is apprent below.
Is this a bug og a feature I have overlooked?
Here is the naked code for reproduction, below the results.
------------------------------------------------------------------------
---
version
2000 Jun 27
7
File Extension .OGG
Hi,
I've already sent this to feedback@vorbis.com, but I got no response
and this might be more correctly placed here anyway, so here is a
revised vesrion.
I have one thing to criticize, which is the file extension *.OGG.
It's ambigous (the Netrek meaning) and using it for both video and
audio seems confusing. Plus, there are a lot of OGG files floating
around that are generated by
2000 Jun 27
7
File Extension .OGG
Hi,
I've already sent this to feedback@vorbis.com, but I got no response
and this might be more correctly placed here anyway, so here is a
revised vesrion.
I have one thing to criticize, which is the file extension *.OGG.
It's ambigous (the Netrek meaning) and using it for both video and
audio seems confusing. Plus, there are a lot of OGG files floating
around that are generated by
2007 Feb 01
2
Losing factor levels when moving variables from one context to another
Hi, there
I'm currently trying to figure out how to keep my "factor" levels for a
variable when moving it from one data frame or matrix to another.
Example below:
vec1<-(rep("10",5))
vec2<-(rep("30",5))
vec3<-(rep("80",5))
vecs<-c(vec1, vec2, vec3)
resp<-rnorm(2,15)
dat<-as.data.frame(cbind(resp, vecs))