Displaying 20 results from an estimated 5000 matches similar to: "[Off Topic] searching for a quote"
2007 Nov 06
1
A suggestion for an amendment to tapply
Dear R-developers,
when tapply() is invoked on factors that have empty levels, it returns
NA. This behaviour is in accord with the tapply documentation, and is
reasonable in many cases. However, when FUN is sum, it would also
seem reasonable to return 0 instead of NA, because "the sum of an
empty set is zero, by definition."
I'd like to raise a discussion of the possibility of an
2006 Oct 24
1
Cook's Distance in GLM (PR#9316)
Hi Community,
I'm trying to reconcile Cook's Distances computed in glm. The
following snippet of code shows that the Cook's Distances contours on
the plot of Residuals v Leverage do not seem to be the same as the
values produced by cooks.distance() or in the Cook's Distance against
observation number plot.
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
2008 Jan 28
0
[OT] - standard errors for parameter estimates under ridge regression and lasso?
Dear R community,
I'm curious to know how people go about estimating standard errors for
parameter estimates after model selection by ridge regression and the
lasso. Do you have any practical or theoretical advice?
Warmly,
Andrew
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia Fax:
2007 Feb 10
0
Can we change environment within the browser?
Dear R-helpers,
when in the browser, is it possible to change the environment, so as
to be able to easily access (print, manipulate) objects in the parent,
or elsehwere?
I know that it is possible to evaluate expressions in different
environments, using eval(), but I would prefer to avoid that if
possible.
Thanks,
Andrew
--
Andrew Robinson
Department of Mathematics and Statistics
2006 Dec 10
0
lmer, gamma family, log link: interpreting random effects
Dear all,
I'm curious about how to interpret the results of the following code.
The first model is directly from the help page of lmer; the second is
the same model but using the Gamma family with log link. The fixed
effects make sense, because
y = 251.40510 + 10.46729 * Days
is about the same as
log(y) = 5.53613298 + 0.03502057 * Days
but the random effects seem quite
2007 Jun 14
0
How to get a point estimate from the studentized bootstrap?
Dear Friends and Colleagues,
I'm puzzling over how to interpret or use some bootstrap intervals. I
think that I know what I should do, but I want to check with
knowledgeable people first!
I'm using a studentized non-parametric bootstrap to estimate 95%
confidence intervals for three parameters. I estimate the variance of
the bootstrap replicates using another bootstrap. The script
2011 Jun 14
2
Off-topic: (Simple?) Random Sampling when n is a random variable
Hi everyone,
I'm involved in a discussion with a colleague. He suggested a sample
design for a finite-sized process that (to all intents and purposes)
involves tossing a coin and examining the unit if the coin shows
Heads.
I should emphasize that we're both approaching the problem from a
design-based sampling theory point of view. So I have no argument
about the appropriateness of the
2008 Aug 04
1
Decomposing tests of interaction terms in mixed-effects models
Dear R colleagues,
a friend and I are trying to develop a modest workflow for the problem
of decomposing tests of higher-order terms into interpretable sets of
tests of lower order terms with conditioning.
For example, if the interaction between A (3 levels) and C (2 levels)
is significant, it may be of interest to ask whether or not A is
significant at level 1 of C and level 2 of C.
The
2007 Apr 25
3
aggregate similar to SPSS
Hi,
Does anyone know if: with R can you take a set of numbers and aggregate
them like you can in SPSS? For example, could you calculate the percentage
of people who smoke based on a dataset like the following:
smoke = 1
non-smoke = 2
variable
1
1
1
2
2
1
1
1
2
2
2
2
2
2
When aggregated, SPSS can tell you what percentage of persons are smokers
based on the frequency of 1's and 2's. Can
2006 Feb 19
3
Changing predictor order in lm()
Dear community,
can anyone provide a snippet of code to force the lm() to fit a model with
terms in the formula in an arbitrary order? I am interested in something
like:
lm(y ~ A * B + C, data=data)
where the interaction of A and B should be in the formula before C. My
goal is to simplify my presentation of models using the anova() statement.
I have found that this should be possible using
2007 Mar 16
3
ARIMA standard error
Hi,
Can anyone explain how the standard error in arima() is calculated?
Also, how can I extract it from the Arima object? I don't see it in there.
> x <- rnorm(1000)
> a <- arima(x, order = c(4, 0, 0))
> a
Call:
arima(x = x, order = c(4, 0, 0))
Coefficients:
ar1 ar2 ar3 ar4 intercept
-0.0451 0.0448 0.0139 -0.0688 0.0010
s.e.
2005 Sep 08
1
Creating very small plots (2.5 cm wide) in Sweave
Hi everyone,
I was wondering if anyone has any code they could share for creating
thumbnail plots in Sweave. For example, I'd like a plot like the
following:
y <- c(40, 46, 39, 44, 23, 36, 70, 39, 30, 73, 53, 74)
x <- c(6, 4, 3, 6, 1, 5, 6, 2, 1, 8, 4, 6)
opar <- par(mar=c(3,3,0,0))
plot(x, y, xlab="", ylab="")
abline(h=mean(y), col="red")
par(opar)
2007 Mar 08
2
augPred in lmer
I read the posts about augPred with lme, but does anyone know if there is a correlate for augPred for lmer? Specifically, I want to be able to use it to plot projections for all groups in an lmer class object using plot(augPred(lmer.object)).
Thanks,
Kyle
***************************************
J. Kyle Roberts, Ph.D.
Baylor College of Medicine
Center for Educational Outreach
One Baylor Plaza,
2006 Feb 10
1
Splitting printed output in Sweave
Dear R community,
I'm trying to figure out if there is any way to split the printed output
of some commands, for example summary.lme, so that I can intersperse
comments in Sweave. I don't mind running the command numerous times and
masking various portions of the output, or saving the output as an object
and printing it, but I can't figure out how to do either. Does anyone
have any
2006 Dec 05
5
if(){} else{}
Dear R-community,
my data set looks like 'mat' below.
Plant<-c(NA,1,1,1,NA,NA,NA,NA,NA,1);
Value1<-rnorm(1:10);
Value2<-rnorm(1:10);
mat<-cbind(Plant,Value1,Value2);
I receive data from two different sites.
One site is identified by an interger number, the other site has no data in
column Plant=NA.
My pb:
I'm trying to assign labels "A" or "B" to
2007 Mar 24
1
p values in lme4 package
Dear R-users,
I was wondering if anybody knows if it's possible to obtain a p value
for the full model of a GLMM with the lme4 package. I was told that I
should check whether the full model including all the predictor
variables is significant before doing stepwise regression or further
analysis, but I can't figure out how to do this. I also wanted to know
if there's a way of
2006 Nov 09
1
Variance Functions in lme
Using the weight argument with a variance function in lme (nlme), you
can allow for heteroscedasticity of the within-group error. Is there a
way to do this for the other variance components? For example, suppose
you had subjects, days nested within subjects, and visits nested within
days within subjects (a fully nested two-way design) and you had, say
men and women subjects. Could you allow for
2006 Nov 09
1
optimize function with integral form ?
Hi all,
Does anybody have the experience of using optim to estimate variables with integral forms?
here the code:
trun.mean<- function(x) # t is the threshold
{
mu=x[1];
sigma=x[2];
t=x[3];
f <- function(x) (1/(sigma*sqrt(2*pi)))*exp(-(x-mu)^2/(2*sigma^2));
pdf.fun <- function(x) x*f(x);
integrate(f,thre,upper=Inf)$value/integrate(pdf.fun,thre,upper=Inf)$value ;
}
when I
2006 Nov 10
1
About using the boot function
Dear All,
I tried to use the boot function, provided in the boot package, in such a
simple task as to create a bootstrap distribution of the mean of a vector x.
I wrote:
b <- boot(x, mean, R=200)
Well, it doesn't work. I suspect it has something to do with what is called
"second argument" of the "statistic" in the help page of boot. What is the
second argument of
2006 Nov 14
1
Using lrm
Hi,
I have to build a logistic regression model on a data set that I have. I
have three input variables (x1, x2, x3) and one output variable (y).
The syntax of lrm function looks like this
lrm(formula, data, subset, na.action=na.delete, method="lrm.fit",
model=FALSE, x=FALSE, y=FALSE, linear.predictors=TRUE, se.fit=FALSE,
penalty=0, penalty.matrix, tol=1e-7,