On 6 June 2013 00:13, Xu Jun wrote:
> Dear r-helpers,
>
> I have two questions on multilevel binary and ordered regression models,
> respectively:
>
> 1. Is there any r function (like lmer or glmer) to run multilevel ordered
> regression models?
Yes, package ordinal will fit such models.
Cheers,
Some of the levels in my X factor has more than one word (e.g., North
America) which I would like to split into two lines so that my plot does
not get too wide. Any help is appreciated.
lineplot.CI(x.factor = Continent, response = PCC.PrsPts, group =
PointSource, data = master2, cex = 1.2,
xlab =
This is a duplicate question, right?
On Jun 6, 2013, at 12:58 PM, Rebecca Greenblatt wrote:
> Looking to determine sample sizes for both my experimental and control
> groups (I want only a small portion of my participants in my experimental
> condition) in order to compare population means. I wou
Dear All,
This is my first post, and probably (and hence apologies that) my question
is very silly!
I'm having issues with a the mvabund package
(http://cran.r-project.org/web/packages/mvabund/index.html),
and would be great to get some help!
Here is the code (and files are attached):
library
Looking to determine sample sizes for both my experimental and control
groups (I want only a small portion of my participants in my experimental
condition) in order to compare population means. I would be able to
estimate standard deviation beforehand.
I'm using the bpower function from the Hmisc
Hello,
I am comparing treatments by comparing within group to between group distances
like
described in
MJ Anderson. 2001. A new method for non-parametric multivariate analysis of
variance.
Austral Ecology 26: 32 -- 46.
The idea is to find the ratio of within group sum of distance^2 to bet
On 06/07/2013 01:03 AM, Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS
FOUNDATION TRUST) wrote:
Some colleagues nationally have developed a system which means they can pick
the optimal sets of doses for a drug. The system could apply to a number of
drugs. But the actual doses might vary. To
On 07/06/13 03:19, Scott Raynaud wrote:
I actually had tried placing arguments in the call but it didn't work.
However, I did
not think about writing it to a variable and printing. That seems to have done
the
trick. Funny, I don't remember having to do that before, but that's not
surprisin
HI,
Not sure if this is what you wanted.
pdf("BarplotsNew.pdf")
library(plotrix)
lst2<-lapply(seq_len(ncol(dat1)),function(i){
Ctdat<- table(dat1[,i])
Ctdat1<-(Ctdat/sum(Ctdat))*100
dat2<-data.frame(Ctdat,Ctdat1,stringsAsFactors=FALSE)[,-
On Thu, Jun 6, 2013 at 6:43 AM, Ye Lin wrote:
> Hey All,
>
> I have a dataset like this:
>
> DatedayVar1Var2Var3Obs1/1/2013Tue23411/2/2013Wed23521/3/2013Thu24631/4/2013
> Fri24741/5/2013Sat24.5851/6/2013Sun24.9961/7/2013Mon25.31071/8/2013Tue25.711
> 81/9/2013Wed26.11291/10/2013Thu26.513101/11/2013
Revolution Analytics staff write about R every weekday at the Revolutions blog:
http://blog.revolutionanalytics.com
and every month I post a summary of articles from the previous month
of particular interest to readers of r-help.
In case you missed them, here are some articles related to R from t
?formula
-- Bert
On Thu, Jun 6, 2013 at 12:52 PM, Jack Luo wrote:
> Hi,
>
> I am trying to find a way to fit a glm model with all the possible
> interaction terms between different variables, without typing all the
> X1:X2, X1:X3, in the formula, is there a way in R to do that?
>
> Thanks,
>
>
On Jun 6, 2013, at 12:52 PM, Jack Luo wrote:
> Hi,
>
> I am trying to find a way to fit a glm model with all the possible
> interaction terms between different variables, without typing all the
> X1:X2, X1:X3, in the formula, is there a way in R to do that?
The "*" operator does that:
~ X1
Hi,
I am trying to find a way to fit a glm model with all the possible
interaction terms between different variables, without typing all the
X1:X2, X1:X3, in the formula, is there a way in R to do that?
Thanks,
-Jack
[[alternative HTML version deleted]]
___
It is helpful if you provide your example data in a format that is easy for
R-help readers to reproduce, for example, using the dput() function. For
example,
dat <- structure(list(Date = c("1/1/2013", "1/2/2013", "1/3/2013",
"1/4/2013",
"1/5/2013", "1/6/2013", "1/7/2013", "1/8/2013", "1/9/2013",
HI,
May be this helps:
dat1<- read.table("sampledata.txt",header=TRUE,sep=",",stringsAsFactors=FALSE)
pdf("Barplots.pdf")
lst1<-lapply(seq_len(ncol(dat1)),function(i) {Ctdat<-
table(dat1[,i]);Ctdat1<-(Ctdat/sum(Ctdat))*100;barplot(Ctdat1,ylim=c(0,100),xlab=colnames(dat1)[i],ylab="Relative
Frequ
library(reshape2)
?cast
"Use acast or dcast depending on whether you want vector/matrix/array
output or data frame output."
Jean
On Wed, Jun 5, 2013 at 9:35 AM, Bruce Miller wrote:
> Hi all,
>
> I am revisiting using reshape2 to aggregate critter (bats) occurrences
> by time blocks and have t
Dear all,
I am struggling to add a prediction interval to a forest plot that was
created with forest.meta(), package "meta".
I checked the source of forest.meta() and realized that it is heavily
relying on grid. I am lacking any experience with grid graphics. So, I
am having difficulties to find
Or, how to tell thinking like humans from thinking like computers:
www.smbc-comics.com/index.php?db=comics&id=2999
--
Sarah Goslee
http://www.functionaldiversity.org
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PL
I am trying to get new Cusip (registered security) from old . This can be done
in excel using BDP command.
For example:
=BDP("000361AJ Corp","ID_CUSIP"), will give 000361AK1.
Can this be done using RBloomberg? Any help will be much appreciated.
Chirag Maru
Senior Quantitative Analyst
IRON Fi
On 06/06/2013 10:41 AM, Roland Pape wrote:
Dear list,
I have two time series of temperatures from different sites plotted in the same
diagram and would like to color the area between the curves differently,
dependent on whether site 1 is cooler than site 2 (colored let's say in blue)
or warme
Hi Ilai,
after you sent this message I tried your code as well and it worked. As a
result, I reconsidered the code written by me and of course also found the
error in my function simulateEKOP. So for other people assuming errors or ill
behavior in base functions: Forget it: these functions are
On Thu, Jun 6, 2013 at 9:05 AM, William Dunlap wrote:
>
> I said the force was 'required' in the sense that without it
> the function will fail to do what you want in some situations.
With the Force on your side, functions always do what you want.
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdu
gotcha. thanks.
On Thu, Jun 6, 2013 at 12:05 PM, William Dunlap wrote:
> I said the force was 'required' in the sense that without it
>
> the function will fail to do what you want in some situations.
>
> It doesn't make sense to write a function that you know will
>
> fail sometim
I said the force was 'required' in the sense that without it
the function will fail to do what you want in some situations.
It doesn't make sense to write a function that you know will
fail sometimes when you know an easy way to make it work
in all situations.
Bill Dunlap
Spotfire, TIBCO Software
hi bill: I understand what you're doing but, atleast for this case, I
checked and you don't need the force this one. it works without it. so, I
think the force requirement applies only when you're building them up with
the lapply. but definitely I'm opened to clarification. thanks.
On Thu, Ju
Sergio:
Fair question.
Unfair answer: My personal hangup. To my taste, get() makes R like a
macro language instead of doing functional programming. force() makes
me nervous about how I'm passing arguments. I won't attempt to defend
either of these claims, so feel free to dismiss.
Cheers,
Bert
O
Dear list,
I have two time series of temperatures from different sites plotted in the same
diagram and would like to color the area between the curves differently,
dependent on whether site 1 is cooler than site 2 (colored let's say in blue)
or warmer (red). While polygone() works fine to color
I think we really need to see the code.
John Kane
Kingston ON Canada
> -Original Message-
> From: sudha.krish...@marlabs.com
> Sent: Thu, 6 Jun 2013 06:37:41 +
> To: r-help@r-project.org
> Subject: [R] generating a bar chart with two axis for co-linear variable
>
>
>
> Hello Dimit
Hi r-users,
I try to calculate marginal effects of a multinomial logistic regression. To do
this i use mlogit package and effects() function.
Here is how the procedure works (source : effects() function of mlogit package)
:
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varyin
Try the following:
generateABFunction <- function(a, b) {
force(a)
force(b)
function(x) a*x + b
}
f12 <- generateABFunction(1, 2)
f53 <- generateABFunction(5,6)
f12(10:12) # get 12, 13, 14
f53(10:12) # get 56, 61, 66
See, e.g., yesterday's discussion under the s
Hi,
I am not sure what you are looking for. Here are some examples:
foo <- function(a,b,x) a + b*x
> foo
function(a,b,x) a + b*x
a <- 2
b <- 3
x <- 0:10
> foo(a,b,x)
[1] 2 5 8 11 14 17 20 23 26 29 32
Or
library(polynom)
p1 <- polynomial(c(a,b))
> p1
2 + 3*x
f1 <- as.function(p1)
> f1(
Bert Gunter gene.com> writes:
> Another equivalent way to do it?
>
> f2 <- function(c,nm = "gamma",...)
> {
> probFunc <- paste0(c,nm)
> more <- list(...)
> function(x)do.call(probFunc,c(x,more))
> }
>
> This avoids the explicit use of get() and force(), I believe, but are
> there problem
On Jun 5, 2013, at 1:49 AM, Andtrei89 wrote:
> Hi everyone,
>
> I want to open an XML file in R and it also works.
> But then I get a list of all numbers but it isn't in the type of "numeric".
>
> I tried this:
>
> exampleData <-
> "C:/Users/Andreas/Desktop/Thesis/Interzeptionsmodell/Daten/Kar
Perhaps this also helps:
library(plyr)
do.call(rbind,alply(aperm(laply(list(A,B),as.matrix),c(1,3,2)),3)) #Using
Berend's example
1 2 3 4 5
# [1,] -0.591 -0.934 -0.828 0.012 -0.683
#[2,] 1.000 6.000 11.000 16.000 21.000
#[3,] 0.027 1.324 -0.348 -0.223 -0.016
I actually had tried placing arguments in the call but it didn't work.
However, I did
not think about writing it to a variable and printing. That seems to have done
the
trick. Funny, I don't remember having to do that before, but that's not
surprising.
Anyway, thanks for helping to diagno
On 06-06-2013, at 17:04, David Carlson wrote:
> You didn't give us data, but this may give you enough to solve your problem:
>
>> set.seed(42)
>> nrows <- 6
>> ncols <- 5
>> mat1 <- matrix(sample.int(100, 30), nrows, ncols)
>> mat1
> …..
>> newmat <- matrix(rbind(as.vector(mat1), as.vector(mat2
On Thu, Jun 6, 2013 at 5:03 PM, arun wrote:
> HI,
> Not sure I understand your question:
> a <- 2
> b <- 3
> f1<- function(x) a+b*x
>
I don't want the function to depend on the objects a and b, but
instead use the values of those objects (I do this within a function).
Liviu
> f1(2)
> #[1] 8
On Jun 6, 2013, at 10:03 AM, Polwart Calum (COUNTY DURHAM AND DARLINGTON NHS
FOUNDATION TRUST) wrote:
> Some colleagues nationally have developed a system which means they can pick
> the optimal sets of doses for a drug. The system could apply to a number of
> drugs. But the actual doses mi
HI,
Not sure I understand your question:
a <- 2
b <- 3
f1<- function(x) a+b*x
f1(2)
#[1] 8
f1(3)
#[1] 11
f<- function(x) 2+3*x
f(2)
#[1] 8
f(3)
#[1] 11
A.K.
sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_CA.UTF-8 L
On Thu, Jun 6, 2013 at 4:48 PM, Liviu Andronic wrote:
> Dear all,
> Given:
> a <- 2
> b <- 3
>
> I'd like to obtain the following function:
> f <- function(x) 2 + 3*x
>
> but when I do this:
> f <- function(x) a + b*x
> ##f
> ##function(x) a + b*x
>
> the 'a' and 'b' objects do not get evaluated t
You didn't give us data, but this may give you enough to solve your problem:
> set.seed(42)
> nrows <- 6
> ncols <- 5
> mat1 <- matrix(sample.int(100, 30), nrows, ncols)
> mat1
[,1] [,2] [,3] [,4] [,5]
[1,] 92 70 83 397
[2,] 93 13 23 46 82
[3,] 29 61 40 73 98
[
Some colleagues nationally have developed a system which means they can pick
the optimal sets of doses for a drug. The system could apply to a number of
drugs. But the actual doses might vary. To try and explain this in terms that
the average Joe on the street might understand if you have som
On 06/06/2013 15:52, Dimitri Liakhovitski wrote:
Thank you very much, Brian.
It's clearly christal clear - but one needs a christal ball to realize
that! :-)
So I learned: architecture = bitness
On current Windows, yes.
But not on OS X nor Linux nor Solaris nor FreeBSD
It indicates the ty
Thank you very much, Brian.
It's clearly christal clear - but one needs a christal ball to realize
that! :-)
So I learned: architecture = bitness
Dimitri
On Thu, Jun 6, 2013 at 2:19 AM, Prof Brian Ripley wrote:
> On 06/06/2013 00:38, Dimitri Liakhovitski wrote:
>
>> Hello!
>> I installed rJa
Dear all,
Given:
a <- 2
b <- 3
I'd like to obtain the following function:
f <- function(x) 2 + 3*x
but when I do this:
f <- function(x) a + b*x
##f
##function(x) a + b*x
the 'a' and 'b' objects do not get evaluated to their constants. How
could I do that?
Thanks,
Liviu
--
Do you know how to
Presumably something like
r <- sshc(50)
print(r)
But if you were getting output before than you already have a script
that does something like this. It would be better to find it...
Best,
Ista
On Thu, Jun 6, 2013 at 9:02 AM, Scott Raynaud wrote:
> Ok. Now I see that the sshc function is not b
Hi all
I have a powerline network connection which I'm investigating.
The test network contains some nodes to which I ping from one host.
The source host is always the same and I split the data to get files
for each connection.
A lot of ping requests get lost and I'm trying to plot an
autocorrelat
On 05-06-2013, at 23:56, ThomasH wrote:
>
> Hello together,
>
> this is ma first post, so please aplogize me if post this in the wrong
> section.
>
> I have problem concerning ma two matrizes.
>
> After a regressione and so on, I got two matrizes
>
> Matrixres contains the results of ma cal
Hi,
Try:
hsb2 <- read.csv("http://www.ats.ucla.edu/stat/data/hsb2.csv";)
varlist<-names(hsb2)[8:10]
fun2<- function(varName){
res<- sapply(varName,function(x){
model1<-
lm(substitute(cbind(female,race,ses)~i,list(i=as.name(x))),data=hsb2)
sM<- summary(model1)
Hi David,
Thank you very much for your reply. I do understand your point. I was requested
to do
power analyses for null findings by reviewers. I think simulations would be an
alternative
choice given the validity of post hoc power analysis is questionable. The
package, pamm
does simulation. But
Hi all!
I'm using ssplot for drawing a map of Austria and colour the nine provinces
regarding their share of employment. Now I wanted to add the figures in each
province and failed miserably. Using the locator() and text() function
caused the error message "invalid graphics state".
Dear snpStats users,
I'm working with a large SnpMatrix object (roughly 5000 samples x 200K snps)
and I've noticed using numerical accessors is extremely slow, e.g, see times
below, takes over 1.5 seconds to retrieve a single cell in SnpMatrix format
[1,1], versus 0.0 seconds to access the same da
I'm using ssplot for drawing a map of Austria and colour the nine provinces
regarding their share of employment. Now I wanted to add the figures in each
province and failed miserably. Using the locator() and text() function
caused the error message "invalid graphics state". I try to show you what I
Hi all,
I just uploaded a new version of the bpcp package. It calculates confidence
intervals for a survival distribution for right-censored data using the newly
developed beta product confidence procedure. Previously developed methods can
have substantial error rate inflation for the lower l
Hi r-users,
I try to calculate marginal effects of a multinomial logistic regression. To do
this i use mlogit package and effects() function.
Here is how the procedure works (source : effects() function of mlogit package)
:
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varyin
Hi all,
I just uploaded an update to the interval package that does NPMLE estimates of
survival distribution and weighted logrank tests for interval censored data.
The update now includes a confidence interval method for the survival that uses
a modified bootstrap method.
Mike
***
Dear Ligges,
*Well, *
*
*
*1st, you should find the "*Sweave.sty" file, I am sure you can.
2nd, in the Latex configure menu, adding the path containing the "
Sweave.sty"
That will be OK.
Best Wishes
Guanhao Liu
On Fri, Mar 22, 2013 at 6:56 PM, Uwe Ligges wrote:
> I typically run
>
> R CMD
Ok. Now I see that the sshc function is not being called. Thanks for pointing
that out.
I'm not certain about the solution, however. I tried putting call("sshc") at
the end of the
program, but nothing happened. My memory about all of this is fuzzy.
Suggestions
on how to call the functio
Pfeiffer, Steven miamioh.edu> writes:
> I have been using the function lme() from package 'nlme' for several months
> now without any problems. Suddenly, it cannot find a factor in my data.
> Is this a new bug of some kind? My code and output are below.
> Thanks for your help!
> -Steve Pfeiffe
Hi Scott,
As others have pointed out, all your script does is define functions.
It doesn't generate "output" because those functions are never called.
Basically you are missing part of the program--possibly in another
file--that actually calls the sshc function.
Best,
Ista
On Thu, Jun 6, 2013 at
Ok. I tried copying the original program, changing all _ to <- and running in
3.0.1. Still no error
message or output. It's a mystery to me.
- Original Message -
From: William Dunlap
To: Scott Raynaud ; "r-help@r-project.org"
Cc:
Sent: Wednesday, June 5, 2013 2:17 PM
Subject: RE: [
On 05.06.2013 11:56, TwistedSkies wrote:
Good Afternoon All,
I am attempting to use the SendMailR function, I have checked with our I.T.
department that I am using the correct server and I have the right
permissions to connect and they have sent emails via this server but not
through R and I h
Dear Patty,
I would leave others to point you to the right packages, but I'd suggest you
read this excellent R-based book: "Data Analysis Using Regression and
Multilevel/Hierarchical Models", by Andrew Gelman and Jennifer Hill (Cambridge
University Press, 2006).
Kind regards,
José
Prof. José
64 matches
Mail list logo