I think you are over-concerned with the term "pseudo-replication".
All this means is that the error source is nested, and not a full replicate.
What you haven't done, and need to do, is to describe your experiment
in terms of the real variables and error sources. Then code them as
"fixed" or "
Hi, I am wondering if there is a package for doing conditional logistic
regression for nested case-control study as described in "Estimation of
absolute
risk from nested case-control data" by Langholz and Borgan (1997) where
Horvitz-Thompson sampling weight (log of (number in the risk set divid
Thanks. I suddenly realised this as I was cycling down to the local grocery
store, about 10 minutes after posting the problem. I felt like an idiot.
Thanks for confirming my stupidity.
john
--- On Sat, 2/26/11, Phil Spector wrote:
> From: Phil Spector
> Subject: Re: [R] Transform a dataset
Are you a fan of James Joyce? Is the Caps key on your keyboard broken?
-- Bert
On Sat, Feb 26, 2011 at 10:09 AM, tsvi sabo wrote:
> Hi,i would like to know what is the best way to write a procedure in R,it
> seems that when i run a script it doesn't wait for previouse code lines to be
> excute
Dear All,
I have run PCA using prcomp() and generated a loading plot using biplot(). In
addition, I would like to extract the
weighting for each of the variables in the loading plot so I can see which of
the variables have the most influence
on the distribution of the points in a 2D plot of PC
Hi Ben:
1) Confession: I did not and have not read your post in detail.
2) IMHO, the following advice:
> "Pseudo replication is really about a lack of independence between
> measurements, So you need to work backwards and see where you are building
> in a known lack of independence. And where t
Hello Everyone,
*Question: *How do you calculate the sum of squares for a two-way
_unbalanced_ ANOVA?
*What I have done:*
I have found many useful tutorials online for running a balanced two-way
ANOVA but I haven't had much luck for running a unbalanced two-way
ANOVA. From what I have read,
Hans,
Both your methods worked great! They was exactly what I was looking for.
I ended up using the second method as it is a little more efficient:
fn2nd_fun <- function(x) eval(fn2nd, list(x=x))
ex <- seq(from=0, to=1, length.out = 1000)
y1 <- fn2nd_fun(ex)
...
r <- uniroot(fn2n
Hi all,
I'm quite new to wireframe, essentially what I want to do is display a graph,
and z-values > 1 would be yellow and those < 1 would be blue.
This is a bit of my data.
0.334643563 0.350913807 0.383652307
0.370325283 0.38779016 0.4238
Dear R-Helpers,
I want to try the 2D (two-dimensional) convolution in R.
For example, let us we have the following kernel and data.
kernel <- (1,2,3,2,1)
data <- array(1:100, dim=c(10,10))
I know the function 'convolve' only for one-dimensional convolution, but it
is just for a 1D sequence.
Is t
Hi,i would like to know what is the best way to write a procedure in R,it seems
that when i run a script it doesn't wait for previouse code lines to be
excuted,i would like to know how to force R to hold on a code line until it is
processed,for example:i want to choose from a list the name of th
sry,
new try:
tm<-c(12345,42352,12435,67546,24234,76543,31243,13334,64562,64123)
gr<-c(1,3,1,2,2,4,2,3,3,3)
d<-data.frame(cbind(time,gr))
where tm are unix times and gr the factor grouping by
i have a skalar for example k=500
now i need to calculate in for every row how much examples in the g
Dear R-Helpers,
I want to try the 2D (two-dimensional) convolution in R.
For example, let us we have the following kernel and data.
kernel <- (1,2,3,2,1)
data <- array(1:100, dim=c(10,10))
I know the function 'convolve' only for one-dimensional convolution, but it
is just for a 1D sequence.
Is t
Mean doesn't work either... I understand that the message "replacement has 0
items, need 37597770" implies that the function is not returning any values,
but I don't understand why then this is not the case in the example.
DF = data.frame(read.table(textConnection("A B C D E
1 1 a 1999
Hi Jorge and R users
Thank you so much for the responses. You input helped me alot and
potentially can help me to solve one more problem, but I got error message.
I am sorry to ask you again but if you can find my problem in quick look
that will be great. I hope this will not cost alot of your t
Hi and thanks to all R developers and helpers,
I wanrt to take the 1 and 3 dimensions of this object to create a new one
without the years and with the next functions to do some specific calculations:
> str(PMpa)
num [1:499105, 1:60, 1:12] 29.8 55.8 29.7 25.1 25 ...
- attr(*, "dimnames")=List
Greetings,
I have been trying to use the RInside package with C++ however I am running
into an error.
I use Ubuntu Linux 10.04 (64-bit) and my R version is 2.12.2. I compiled R from
source to give me a shared R library, shared BLAS (ATLAS). When I try to
compile one of the examples given in the
Thank you very very very much Prof Harrell!! You've made my day!!
--
View this message in context:
http://r.789695.n4.nabble.com/Interpreting-the-example-given-by-Prof-Frank-Harrell-in-Design-validate-cph-tp3316820p3325844.html
Sent from the R help mailing list archive at Nabble.com.
__
On 25/02/2011 21:22, Ben Ward wrote:
Original Message
Subject:Re: [R] ANOVA and Pseudoreplication in R
Date: Fri, 25 Feb 2011 12:10:14 -0800
From: Bert Gunter
To: Ben Ward
CC: r-help
I can hopefully save bandwidth here by suggesting that this belongs on
t
I have heard about this before happening on other platforms. Frankly I'm not
positive how this happens. My best guess is that there's a tiny bit of numeric
instability in the 9+ decimal place so that on a given iteration a one variable
choice at random looks better than the other. Any other idea
Dear Bill and Phil
Many thanks for your help, your solutions worked perfectly.
Bill: I did not specify whether the data was a matrix or dataframe
because it is in fact the Expression file in an eset object (bioBase).
Thank you so much again!
Hind
On Sat, Feb 26, 2011 at 4:34 PM, William Dunlap
You didn't say if your data set was a matrix or data.frame.
Here are 2 functions that do the job on either and one that
only works with data.frames, but is faster (a similar speedup
is available for matrices as well). They all compute the
number of small values in each row, nSmall, and extract the
If the matrix in question is named "mymat", then
mymat[apply(mymat,1,function(x)sum(abs(x) <= 1.58) < 2),]
(untested due to a lack of a reproducible example) should give
you a matrix without any rows containing two or more values
with absolute value less than 1.58.
I'm not sure ifelse would
Hello
The data set I am examining has 7425 observations (rows with unique
identifiers) and 46 samples(columns).
I have been trying to generate a dataset that filters out observations
that are "negligible"
The definition of "negligible" is absolute value less or equal to 1.58.
The rule that I wo
Hello Abhishek,
Also notice that if you are on windows, then rggobi doesn't work for the
latest R (with ggobi 2.1.8) because of GTK/dll issues. In such a
case, Greg's other suggestions are probably the way to go for the time
being.
Best,
Tal
Contact
Details:-
Dear R-Helpers,
I want to try the 2D (two-dimensional) convolution in R.
For example, let us we have the following kernel and data.
kernel <- (1,2,3,2,1)
data <- array(1:100, dim=c(10,10))
I know the function 'convolve' only for one-dimensional convolution, but it
is just for a 1D sequence.
Is t
This is great, thanks a lot, Gabor!
On Fri, Feb 25, 2011 at 6:18 PM, Gabor Grothendieck
wrote:
> On Fri, Feb 25, 2011 at 5:21 PM, Dimitri Liakhovitski
> wrote:
>> Hello!
>>
>> s<-"start"; e<-"end"
>> middle<-as.character(c(1,2,3))
>>
>> I would like to get the following result:
>> "start 123 end
Michael,
i have no experience with the Bayesian models you use, but I could
imagine that the problem is that this classifiedPositive variable is a
list (as you suggest as well). With
unlist()
as.character()
as.factor()
you can convert the variable to anything you may need as an input.
HTH
John -
In the dat data frame, there is exactly one observation
for each Subject/Item combination, so it's clear how to
rearrange the values of Score. In the mydata data frame there
are multiple values for most combinations of x and id, so
reshape2 needs to aggregate y before it can rearrange
I seem to be running into the same problem reported in
https://stat.ethz.ch/pipermail/r-help/2010-November/258265.html
I cannot seem to transform a dataset from long to wide using reshape2.
Clearly I am missing something very simple but a look at the manual and the
reshape paper in JSS does not
On 26.02.2011 15:43, Frank Harrell wrote:
Yao,
I wonder how likely it is that log transformations fit the data. More often
I find that the flexibility of restricted cubic splines is needed.
One of the things that people take for granted when using log() is that they
are assuming that k=0 in
On 25.02.2011 16:16, stephenb wrote:
Bill,
what will be the fastest way to output not just single lines but small data
frames of about 60 rows?
I prefer writing to a text file because the final output is large 47k times
60 rows and since I do not know the size of it I have to use rbind to bu
On 25.02.2011 15:33, Jay wrote:
Hi,
I'm trying to utilize the kohonen package to build SOM's. However,
trying this on my data I get the error:
"Argument data should be numeric"
when running the som(data.train, grid = somgrid(6, 6, "hexagonal"))
function. As you see, there is a problem with t
On 24.02.2011 15:29, Patrick Skorupka wrote:
Hi everybody,
I recently sent out a first message using this tool and was astonished about
the quick and helpful replys. So, thank you in advance for your help, I really
appreciate that!
As already recently mentioned I am new to using R as I have
On 25.02.2011 12:37, zem wrote:
Hi Jessica,
try this: Q[k:c(k+3)]
1. You have written to the R-help mailing list rather than to "Jessica".
Please answer also directly: not all posters are on the mailing list.
2. Please quote the original question.
Uwe Ligges
___
The real weird thing is I wrote "weird" and it comes out "wired"...
The background is that I did a lot of sparse matrices calculations.
Therefore need some indices tweaks, e.g subtract a block from a big matrix.
Then I just create an indicies matrix and use it directly as a vector since
a matrix i
Hello,
On Sat, Feb 26, 2011 at 12:11 PM, Feng Li wrote:
> Dear R,
>
> I found a very wired behavior for a 2-by-2 matrix, see this example
>
>> A <- matrix(1:4, 2)
>> idx4A <- matrix(1:4, 2)
>> A[idx4A]
> Error in A[idx4A] : subscript out of bounds
This shouldn't work. From the help for "[",
There is an rggobi package that makes transferring data between R and ggobi
easy. But I would probably start with the playwith package which I think will
do most of what you want. Some other options are the iplots package, rpanel
package, the fgui package and the tkexamp function in the Teachi
Dear R,
I found a very wired behavior for a 2-by-2 matrix, see this example
> A <- matrix(1:4, 2)
> idx4A <- matrix(1:4, 2)
> A[idx4A]
Error in A[idx4A] : subscript out of bounds
But other matrices are fine,
> B <- matrix(1:9, 3)
> idx4B <- matrix(1:9, 3)
> B[idx4B]
[1] 1 2 3 4 5 6 7 8 9
I ca
On 24.02.2011 19:15, Greg Snow wrote:
Look at ?quantile, especially the detail section on "type" and the second
reference (and the see also section). There are many different definitions of
quantiles/quartiles and different functions use different versions.
Particularly ?boxplots points
On 2011-02-25 15:57, Marius Hofert wrote:
Dear expeRts,
I would like to use LaTeX-like symbols in keys via plotmath. Below is a minimal
example. I get:
Error in fun(key = list(x = 0.5, y = 0.8, text =
list(list(expression(paste("(", :
first component of text must be vector of labels
What's
On 24.02.2011 17:48, Alan Kelly wrote:
Deal all, as MCMClogit does not allow for the specification of several chains,
I have run my model 3 times with different random number seeds and differently
dispersed multivariate normal priors.
For example:
res1 = MCMClogit(y~x,b0=0,B0=0.001,data=mydat
Downey, Patrick urban.org> writes:
>
> Hello,
>
> A colleague is trying to do a fairly complicated power analysis for a
> project. The project would be evaluating random assignment to one of three
> conditions within each of 8 sites. The dependent variable would be binary
> (we do not care at t
Jon,
Version 3.3-0 of rms will be released within 2-3 days. It has a new option
"force" for fastbw, validate, calibrate. force is an integer vector of the
parameter numbers to force into every model. It is meant to work with
type='individual' and its performance with type='residual' needs to be
On 11-02-25 6:15 PM, Kalicin, Sarah wrote:
Hi,
I have two questions:
1) Since I switched to Windows 2007 and downloaded the current R version
(2.12.1; 2010-12-16) for Windows 7 a month ago, I cannot down load packages
through the GUI drop down menu. I get: Warning: unable to access index
On Sat, Feb 26, 2011 at 2:16 AM, jjheath wrote:
> I need to find the root of the second derivative of many curves and do not
> want
> to cut and paste the expression results from the deriv() or D() functions
> every time. Below is an
> example. What I need to do is refer to "fn2nd" in the uniroo
Yao,
I wonder how likely it is that log transformations fit the data. More often
I find that the flexibility of restricted cubic splines is needed.
One of the things that people take for granted when using log() is that they
are assuming that k=0 in making the transformation log(x + k). It is o
Bert has put a finger on one of the key questions: Are we there yet?
Global optima are very difficult to find in many, possibly most problems.
We can check for local optima. In package optimx (currently resetting it on
CRAN due to a
variable naming glitch with Rvmmin -- should be there in a coupl
> I need to find the root of the second derivative of many curves and do not
> want to cut and paste the expression results from the deriv() or D()
> functions every time. Below is an example. What I need to do is refer to
> "fn2nd" in the uniroot() function, but when I try something like
> uniro
On 2011-02-26 04:12, Gallavan, Robert wrote:
Hi folks,
I'm doing ANOVA with multiple comparisons. I've used both the TukeyHSD
function and the multcomp procedure. In both cases, I get some tantalizing
results such as this...
e = aov(lm(d.all[,(n+4)] ~ d.all[,4])
TukeyHSD(e)
Tukey mult
On 26 February 2011 11:00, wrote:
> Dear R community,
> I would like to source a file in my linux system to set a few environment
> variables.
> I have tried:
>
>> system("source /home/james/build//ccp4-6.1.13/include/ccp4.setup")
>
> and got:
>
> sh: source: not found
Someone has been writing
Hi folks,
I'm doing ANOVA with multiple comparisons. I've used both the TukeyHSD
function and the multcomp procedure. In both cases, I get some tantalizing
results such as this...
e = aov(lm(d.all[,(n+4)] ~ d.all[,4])
TukeyHSD(e)
Tukey multiple comparisons of means
95% family-wise co
Hi,
I have a problem with an invalid variable type.
My sample dataset is looking like this:
> str(factivaTDM.train)
'data.frame': 4 obs. of 14 variables:
$ access: num 2 3 2 1
$ billion : num 2 1 2 2
$ compani : num 7 6 1 2
$ data : num
Thanks Brian, I stand corrected.
David Scott
On 27/02/2011 12:32 a.m., Prof Brian Ripley wrote:
It is less clear what you are after, but the canonical way to decide
if your R session is on Windows is
.Platform$OS.type == "windows"
Unlike {R.}version$os and Sys.info()["sysname"], the set of va
> I have what I think is some kind of linear programming question.
> Basically, what I want to figure out is if I have a vector of numbers,
>
> > x <- rnorm(10)
> > x
> [1] -0.44305959 -0.26707077 0.07121266 0.44123714 -1.10323616
> -0.19712807 0.20679494 -0.98629992 0.97191659 -0.77561593
>
It is less clear what you are after, but the canonical way to decide
if your R session is on Windows is
.Platform$OS.type == "windows"
Unlike {R.}version$os and Sys.info()["sysname"], the set of values
here is known and documented. As ?R.version does say:
Do _not_ use ‘R.version$os’ to
And what do you think 'source' does? Or system() does (check the help
page)?
Hint: source is not an external command on Linux, but a builtin
command of some shells (e.g. csh, bash), but not of sh -- in sh the
equivalent is '.'.
On Sat, 26 Feb 2011, james.fo...@diamond.ac.uk wrote:
Dear R
Not sure exactly what the original poster was after, but for
distinguishing when I am working on different machines with different
OS, I use something like this:
### Set some state variables
opSys <- Sys.info()["sysname"]
if (opSys == "Windows"){
linux <- FALSE
} else {
linux <- TRUE
}
Da
Dear R community,
I would like to source a file in my linux system to set a few environment
variables.
I have tried:
> system("source /home/james/build//ccp4-6.1.13/include/ccp4.setup")
and got:
sh: source: not found
In fact, using Sys.which("source") I get an empty string.
How can I source th
Hi,
I'm able to establish a successful odbc connection using RODBC 1.3-2 on Win
7 and R 2.12.0. But I'm getting the following error message when I try to
save a data frame into the debase as shown below.
library(RODBC)
bbdb <- odbcConnect("bbdb")
odbcGetInfo(bbdb) # returns ok
sqlSave(bbdb, USAr
On Feb 26, 2011, at 1:07 AM, Shankar Lanke wrote:
Dear All,
I am new to R. I amazed by this software. I have a question regarding
boxplot.
I have three columns say X, Y,ID (X is time from 0 to 12 hrs, Y is a
variable dependent on X) I can plot a simple boxplot if it is just one
group. But I h
Dear R Users,
Kindly advice me what's wrong in my programming.
I'm using the Cochrane-Orcutt two stage procedure with Prais Wisten
transformation, below is my R programming :
>Y<-c(60.8,62.5,64.6,66.1,67.7,69.1,71.7,73.5,76.2,77.3,78.8,80.2,82.6,84.3,83.3,84.1,86.4,87.6,89.1,89.3,89.1,
>,
+
89
Hi, I am trying to write the Realized GARCH model with order (1,1)
The model can be describe bellow:
r_t = sqrt( h_t) * z_t
logh_t = w + b*logh_(t-1) + r*logx_(t-1)
logx_t = c + q*logh_t + t1*z_t +t2*(z_t ^2 -1) + u_t
and z follow N(0,1) , u follow N(0, sigma.u^2)
But I'm troubled with the si
Dear All,
I am new to R. I amazed by this software. I have a question regarding
boxplot.
I have three columns say X, Y,ID (X is time from 0 to 12 hrs, Y is a
variable dependent on X) I can plot a simple boxplot if it is just one
group. But I have 10 groups and I want to plot all of them in one gr
I need to find the root of the second derivative of many curves and do not
want
to cut and paste the expression results from the deriv() or D() functions
every time. Below is an
example. What I need to do is refer to "fn2nd" in the uniroot() function,
but when I
try something like uniroot(fn2nd,c
Hi Greg
Ability to zoom in/out on x/y axis to begin with and then
adding/removing data sets.
Thanks!
-Abhi
On Fri, Feb 25, 2011 at 12:52 PM, Greg Snow wrote:
> What types of interaction do you want?
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> g
66 matches
Mail list logo