There's a trick with this: you need to make sure you are using anova.lme rather
than anova.lm. So if in this example you do
anova(fit0, fit)
you will get an error.
Simon.
Simon Blomberg, BSc (Hons), PhD, MAppStat.
Lecturer and Consultant Statistician
Faculty of Biological and Chemical
Let me take an artifical matrix :
dat = matrix(rnorm(200*200), 200, 200)
My goal is to visualize this matrix according to the procedure, described in
previous mails. I took Mendelssohn's advice and got following advice :
?plot.im
Z - setcov(owin())
plot(Z)
hello everybody
solved the problem with summary, now I have another one
eg I estimate
try.op - polr(
as.ordered(sod.sit.ec.fam) ~
log(y) +
log(1 + nfiglimin) +
log(1 + nfiglimagg) +
log(ncomp - nfiglitot) +
On 3/15/2008 1:30 AM, Ng Stanley wrote:
Hi,
a[length(a)] gives the value of last element. Is there an alternative
without using functions ?
I'm not sure what you mean by without using functions, but how
about this:
tail(a, 1)
?tail
[[alternative HTML version deleted]]
Hello,
I've recently come across a situation where I'm trying to read in [genotype
data] files that have around 80,000,000 lines, 4 fields, with a high proportion
of repeated strings, here's a sample:
rsXXX SAMPLE0001 CG 0.05302
rsXXSAMPLE0001 CC 0.06817
Thomas Steiner wrote:
How do I write bold face in the legend - the function does not accept
font=2 as argument?
How do I plot a legend box with a background color, but not a border?
Or, better: How do I specify the color of the legend-box-borderline?
Okay, I abuse the legend, but have a
I suspect you have a file permission problem, and noticed filehash has
some bugs which would mask this. E.g. it does
createDB1 - function(dbName) {
if(!hasWorkingFtell())
stop(need working 'ftell()' to use 'DB1' format)
if(!file.exists(dbName))
file.create(dbName)
I am away until te 18th of April.
However, I will have a look to my email from time to time.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hi the list,
I am using R2.6.2. I don't now why, the quote used in the output of
'new' seams not compatible with Sweave. Is there a way to change them ?
Is it something link with R, or link with my computer configuration ?
setClass(E,list(e=factor))
[1] E
new(E)
An object of class “E”
On Fri, Mar 14, 2008 at 6:42 PM, Hans W Borchers [EMAIL PROTECTED] wrote:
I have some problems, when I try to model an
optimization problem with some constraints.
The original problem cannot be solved analytically, so
I have to use routines like Simulated Annealing or
Sequential
On 15/03/2008 7:29 AM, Christophe Genolini wrote:
Hi the list,
I am using R2.6.2. I don't now why, the quote used in the output of
'new' seams not compatible with Sweave. Is there a way to change them ?
Is it something link with R, or link with my computer configuration ?
Try using do.call:
library(tseries)
adjClose0 - sapply(LETTERS[1:3], get.hist.quote, quote = AdjClose,
simplify = FALSE)
adjClose - do.call(merge, c(adjClose0, retclass = data.frame))
On Sat, Mar 15, 2008 at 9:37 AM, rich.p.martin [EMAIL PROTECTED] wrote:
Hi, the snippet of code below
Megh Dal [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Let me take an artifical matrix :
dat = matrix(rnorm(200*200), 200, 200)
My goal is to visualize this matrix according to the procedure,
described in previous mails. I took Mendelssohn's advice and got
following
On 15/03/08 - 15:21, Luca Braglia wrote:
Hello everybody
as I said, i'm not a ordered probit guru, but what happened seems
to me a little strange.
Here I put my dataset
http://bragliozzo.altervista.org/asd.dta
my fault: i forgot the new antileech system on altervista
Hi the list
Is it possible to create an empty matrix ? I do not mean an matrix with
a single value that is NA (which is not empty) but a real empty one,
with length=0.
I do not understand why we have length(numeric()), length(factor()) and
length(character()) to zero, and length(array()) to
On Sat, Mar 15, 2008 at 04:33:32PM +0100, Christophe Genolini wrote:
Hi the list
Is it possible to create an empty matrix ? I do not mean an matrix with
a single value that is NA (which is not empty) but a real empty one,
with length=0.
Sure:
matrix(nrow=0, ncol=5)
[,1] [,2] [,3]
On Sat, 15 Mar 2008, Gabor Csardi wrote:
On Sat, Mar 15, 2008 at 04:33:32PM +0100, Christophe Genolini wrote:
Hi the list
Is it possible to create an empty matrix ? I do not mean an matrix with
a single value that is NA (which is not empty) but a real empty one,
with length=0.
Sure:
hello everybody
I use the following code for my programming it runs with the error as
specified below.Any help that would disolve the error will be highly
appreciated.
Thanks in advance
my code looks like this
R programme for simulating the power of the two sample t test vs various
Another approach might be to start with a list, pad
the vectors and then convert to a data.frame. Here is
something that Henrique Dallazuanna and Phil Spector
suggested to me a couple of days ago as a way of
solving something of a similar problem.
It seems to have the advantage that it will
Will
mymatrix - NULL do what you want?
--- Christophe Genolini [EMAIL PROTECTED] wrote:
Hi the list
Is it possible to create an empty matrix ? I do not
mean an matrix with
a single value that is NA (which is not empty) but a
real empty one,
with length=0.
I do not understand why we
kasturi bardhan wrote:
hello everybody
I use the following code for my programming it runs with the error as
specified below.Any help that would disolve the error will be highly
appreciated.
Thanks in advance
my code looks like this
R programme for simulating the power of the two
## Corrected code:
sim.size - 200
sample.size - 10
set.seed(231)
mu1 - 0
delta - seq(-2,2, length=50)
pow.ttest- numeric(50)
pow.kstest- numeric(50)
pow.wtest- numeric(50)
for (j in 1:length(delta))
{
mu2 - mu1 + delta[j]
pt.test - numeric(sim.size)
pw.test - numeric(sim.size)
John Kane a écrit :
Will
mymatrix - NULL do what you want?
Well, in your code, 'mymatrix' is not a matrix :
a-array(dim=c(0,0)) # Solution of Gabor Csardi
0 x 0 matrix
class(a)
[1] matrix
b-NULL
class(b)
[1] NULL
Your definition will probably works in most case, but in S4, the uses of
Hi Jim,
thank you very much for your answers!
How do I write bold face in the legend - the function does not accept
font=2 as argument?
par(font=2)
perfect, thanks.
How do I plot a legend box with a background color, but not a border?
Or, better: How do I specify the color of
Hello, optim searches for min (or max) of a function, but is it possible to
solve for a specific value? I mean, I want to find the value of a and b that
give the function value closest to ZERO (and not min or max) in the below.
is it possible? thanks
test=function(x){
a=x[1]
b=x[2]
if
Thanks David, It is working. Holtman's also gave me a solution but, I wanted to
have a color pallet for description of colors, that was not in his solution.
However I need one small modification. If I want to plot only lower diagonal
elements of 'dat' then how should I proceed? What I want is,
Greetings,
I have been working on a script that conducts repeated statistics and
plots to my data. In this case it is sub-setting the dataframe by
month.
The intent is to develop a custom analysis and plotting that I can run
on a large number of data sets.
Unfortunately, a small portion
If you want to find the value of x such that f(x) = 0, then you can minimize
f^2 or abs(f) using optim. Hope this helps,
Ian
francogrex wrote:
Hello, optim searches for min (or max) of a function, but is it possible
to solve for a specific value? I mean, I want to find the value of a and
Hi all,
I apologize for what might be a silly question.
I am interested in doing a one way anova.
This is not too hard in and of itself, either with anova, aov or oneway.test
.
However, I need to
1) get pvalues,
2) do a posthoc analysis with Tukey HSD,
3) and have (sometimes) an unbalanced
Dear Jon,
You probably want to take a look at try and tryCatch. Either of
them will let you do what you want.
Best,
R.
On Sat, Mar 15, 2008 at 7:00 PM, Jon Loehrke [EMAIL PROTECTED] wrote:
Greetings,
I have been working on a script that conducts repeated statistics and
plots to my data.
Megh Dal [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
Thanks David, It is working. Holtman's also gave me a solution but,
I wanted to have a color pallet for description of colors, that was
not in his solution.
His second posting did:
Hi the list,
With basic type, length gives the length of the vector
Wtih list, length gives the number of item
With S4 object, length gives...one. Even with an objet with empty slot.
setClass(E,representation(e=numeric))
[1] E
length(new(E))
[1] 1
setClass(E,representation(e=matrix))
[1] E
I replied off list, accidentally, below. Christophe then asked
Probably you want to write a method for 'length' with signature x = 'E'.
Well you're right. Consider the following code :
setClass(A,representation(nb=numeric,li=list))
setMethod(
show,
A,
function(object){
There is one obvious way:
test - function(x, value = 0) {
a - x[1]
b - x[2]
ex - if (all(x 0))
(((a/(a+b))*(beta(a,b)/(beta(a,b)-beta(a,b+6-0.35259)
else Inf
(ex - value)^2
}
opt - optim(c(1,2),test)
opt[c(par, value)]
$par
[1] 0.5141272 2.4810257
Hi:
Can anyone advice me on how to loop and perform a
calculation through all the columns.
here's my data
xd-
c(2.2024,2.4216,1.4672,1.4817,1.4957,1.4431,1.5676)
pd-
c(0.017046,0.018504,0.012157,0.012253,0.012348,0.011997,0.012825)
td- c(160524,163565,143973,111956,89677,95269,81558)
Hi,
I have a matrix BEE and want to find the row and column numbers of
the minimum value in that matrix.
The command
which(BEE==min(BEE))
returns only one value which, I take, is the position of the minimum
in a vector with as many elements as the matrix.
Is there a quick and simple way of
Is this what you were looking for:
xd-
+ c(2.2024,2.4216,1.4672,1.4817,1.4957,1.4431,1.5676)
pd-
+ c(0.017046,0.018504,0.012157,0.012253,0.012348,0.011997,0.012825)
td- c(160524,163565,143973,111956,89677,95269,81558)
mydf-data.frame(xd,pd,td)
trans-t(mydf)
trans
[,1]
Yes, they've thought of that.
which(BEE == min(BEE), arr.ind = TRUE)
will do it.
Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary): +61 7 3826 7304
Mobile: +61 4 8819
On 3/15/2008 7:47 PM, Gonçalo Ferraz wrote:
Hi,
I have a matrix BEE and want to find the row and column numbers of
the minimum value in that matrix.
The command
which(BEE==min(BEE))
returns only one value which, I take, is the position of the minimum
in a vector with as many
Does anyone know how to approach R code for the MLE of a geom. distribution?
thanks!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
This is an imprecise question.
There are actually two geometric distributions. See
http://en.wikipedia.org/wiki/Geometric_distribution
They are related, of course. One is defined as the minimum number of
trials to achive one success in bernoulli trials. The other is the
number of failures
41 matches
Mail list logo