Displaying 20 results from an estimated 2000 matches similar to: "Offsets in glmmPQL?"
2002 Sep 13
2
Multiple random effects inlme?
Moi!
I was helping to teach a course on mixed models this week, and we came
across a problem with coding more than one random effect in lme when
they aren't nested.
As an example, suppose we have an experiment where we sample moths from
several populations, and place the moths on different trees, and measure
a trait (in this case survival of offspring, but that's less
important). We
2004 Mar 19
2
Odd behaviour of step (and stepAIC)?
I can only assume I'm betraying my ignorance here, but this is not what
I would expect.
I'm getting the following from a stepwise selection (with both step and
stepAIC):
> step(lm(sqrt(Grids)~ SE + Edge + NH), scope=~ (Edge + SE + NH)^2)
Start: AIC= 593.56
sqrt(Grids) ~ SE + Edge + NH
Df Sum of Sq RSS AIC
<none> 2147.0 593.6
+ Edge:NH 1
2003 Mar 27
5
Plot of Canonical Correlation Analysis
Dear all,
I didn't find any graphical solution in the package "mva" to plot the
canonical scores from a CCA (canonical correlation analysis).
Does anybody knows how to plot or has anybody already programmed :
- the map of the canonical scores,
- the graph of the canonical weights,
- the correlation circle i.e. the canonical loadings ?
Thank you for help ...
2002 Jul 22
1
"New" problem with polr (or optim, or ...)
Hello from a presently sunny Helsinki!
I've bee trying to repeat an analysis I did about 18 months ago (the
reviewers of the paper want something adding to it). I'm using R1.5.0,
but I couldn't see anything in the list of changes between this and
1.5.1 to suggest it would act any differently.
The data is observational, on the changes in the population status of
carabid beetles, and
2003 Jul 02
1
Maximisation of likelihood of a discrete parameter
Moi!
I have a problem where I want to find the ML estimate of a discrete
parameter. I just want a function like optim that finds the max/min
value for a function. Does anyone know of such a function for R?
Thanks.
Bob
--
Bob O'Hara
Rolf Nevanlinna Institute
P.O. Box 4 (Yliopistonkatu 5)
FIN-00014 University of Helsinki
Finland
Telephone: +358-9-191 23743
Mobile: +358 50 599 0540
Fax:
2004 Jan 08
1
Using split.screen
I want to draw a figure with several panels of unequal size, so i
thought I would try using screen(). However, I can't figure out how to
define the sizes as a matrix. I've tried this:
split.screen(matrix(c(0,0.5,0,0.5, 0.5,1,0.5,1), byrow=F, ncol=4))
and a couple of variants on it, but get the same error:
Error in par(.split.screens[[cur.screen]]) :
invalid value specified
2004 Apr 27
3
Mixed Effects Models in S and S-Plus book
Anybody know where I can get the Pinheiro/Bates book?
I can't find a bookstore w/ stock and the publisher
says they don't know when they'll have it again.
Thanks.
-Frank
2004 Oct 20
2
Odd behaviour with scale()
Moi!
A student here has been getting a bit irritated with some side effects
of scale() (OS is Windows XP, the behaviour occurs in R 2.0.0, but not
1.7.1). The problem is that she scales a variable in a data frame, then
does a regression, and tries to get some predictions for some new data.
However, at this point she gets an error (see the example below). This
seems to be because the
2002 Dec 23
1
Strange axis labels?
Moi!
I'm trying to add a rather long label to a y-axis, and it's so long that
it won't fit into one line. However, things get strange when I try and
split it over 2 lines. The problem seems to be the plus/minus symbol,
which means I have to use expression(). I'm using R1.6.1 on Windoze
2000.
As an example:
thing1 <- expression(paste("log odds of survival probability (
2002 Aug 28
0
Extracting variance component estimates from lme
I assume I'm missing something obvious here...
The short form of my main question is: how do I extract variance
components from an lme object?
The longer form (plus optional supplementary question!): I'm looking at
some quantitative genetics, and want to estimate two variance components
so that I can then calculate a statistic called Qst from them. So I
have this:
reg1 <- lme(y ~
2004 Mar 05
4
Probit predictions outside (0,1) interval
Hi!
I was trying to implement a probit model on a dichotomous outcome variable and found that the predictions were outside the (0,1) interval that one should get. I later tried it with some simulated data with a similar result.
Here is a toy program I wrote and I cant figure why I should be getting such odd predictions.
x1<-rnorm(1000)
x2<-rnorm(1000)
x3<-rnorm(1000)
2004 Mar 02
2
Problem with Integrate
The background: I'm trying to fit a Poisson-lognormal distrbutuion to
some data. This is a way of modelling species abundances:
N ~ Pois(lam)
log(lam) ~ N(mu, sigma2)
The number of individuals are Poisson distributed with an abundance
drawn from a log-normal distrbution.
To fit this to data, I need to integrate out lam. In principle, I can
do it this way:
PLN1 <- function(lam, Count,
2005 Aug 25
3
Converting characters to numbers in data frames
I'm sure I'm missing something obvious here, but I can't find the
solution (including in the FAQ etc.).
I have a vector of names of variables like this: NRes.x.y. where x and y
are numbers. I want to extract these numbers as numbers to use
elsewhere. I can extract the numbers as a list of characters using
strsplit(), and convert that to a data frame, e.g.:
2009 Nov 12
1
Substituting vectors into a legend
I have a simple (!) problem. What I want to do is to create a legend with
Greek letters, and substituting numbers into the legend. Like this:
mu=1:3
Mean=rep(mu, each=20)
plot(runif(60), rnorm(60,Mean,0.1), pch=Mean) # create a plot
legend(0.6,1.7, paste("mu =", 1:3), pch=mu)
but with a Greek letter mu.
I think the solution has something to do with substitute() possibly along
with
2001 Sep 03
1
Missing values in time series
Apologies for this - I'm sure I'm missing something somewhere...
I've got a time series with several of missing values in it that I want
to torture with R. But ts doesn't like the NA's, and I can't find any
documentation telling me what to do about it.
Help!
Bob
--
Bob O'Hara
Metapopulation Research Group
Division of Population Biology
Department of Ecology and
A log on Bayesian statistics, stochastic cost frontier, montecarl o markov chains, bayesian P-values
2004 Feb 17
0
A log on Bayesian statistics, stochastic cost frontier, montecarl o markov chains, bayesian P-values
Dear friends,
Over the past weeks, I have been asking a lot of questions about how to
use R in Bayesian analysis. I am brand new to R, but I am very pleased with
it. I started with winbugs but I found winbugs to be a limited software, not
bad but has several limitations. By contrast, R allows the analyst to tackle
any problem with a huge set of tools for any kind of analysis. I love R. In
2004 Dec 19
1
Different graph type can coexisti??
Please consider a data frame
A B C D
1 4 5 0
2 3 2 75
3 4 1 84
4 5 1 90
5 3 0 100
Is there a way to plot column B and C as barplot *and* D as line on the same
graph??
R-2.0.1 powered by Mandrake 10.1
-------------------------------------------------------------------------------------------------------------------------
Landini dr. Massimiliano
Tel. mob. (+39) 347 140 11 94
Tel./Fax. (+39)
2004 Jul 24
3
Population simulation.
Hello,
can anyone tell me if R has any special function for simulating the structure
of human populations? Something like the genetic algorithm?
I need to simulate a sample of a population with a specific structure. Is
there something on R that can help me?
Thanks to everyone.
__________________________________________________________
2004 Oct 31
2
(no subject)
Dear all,
I have several questions regarding fisher.test() in
R, and I'd highly appreciate any help with it.
I have a group of observations, each having people's
income, and an indicator of whether selected in or out
a program. I want to test the difference between
income of people who are in and out.
Because the distribution is far from normal, I decide
to use the fisher's exact
2004 Oct 31
2
(no subject)
Dear all,
I have several questions regarding fisher.test() in
R, and I'd highly appreciate any help with it.
I have a group of observations, each having people's
income, and an indicator of whether selected in or out
a program. I want to test the difference between
income of people who are in and out.
Because the distribution is far from normal, I decide
to use the fisher's exact