gmane.comp.lang.r.general
http://blog.gmane.org/gmane.comp.lang.r.general
hourly11901-01-01T00:00+00:00Gmanehttp://gmane.org/img/gmane-25t.png
http://gmane.org
number of weights in multinom ?
http://comments.gmane.org/gmane.comp.lang.r.general/315143
<pre>Hello,
In the function multinom (package nnet), I get the following message after training for a model with 9 inputs and 6 classes (output) :
# weights: 66 (50 variable)
I understand that there are 50 variables in the model,
but I don't understand the number 66.
How can we interpret this number ?
Thanks,
Franck Vermet.
</pre>Franck Vermet2014-11-18T11:35:49problems with mail message
http://comments.gmane.org/gmane.comp.lang.r.general/315140
<pre>Dear maintainers
I experienced problems with undeliverable messages to R-help
Here is header, which basically says that mail to r-help< at >r-project.org was undelivered and that phil2.ethz.ch refused to accept it.
*************************************
Doručení těmto příjemcům nebo skupinám se nezdařilo:
r-help< at >r-project.org
Při doručování této zprávy na tuto e-mailovou adresu došlo k chybě. Pokuste se zprávu odeslat znovu. Pokud potíže potrvají, obraťte se na helpdesk.
Následující organizace odmítla zprávu: phil2.ethz.ch.
**********************************
I asked our IT people but they do not know reason.
If necessary I can send whole returned message with all diagnostic info.
Regards
Petr
________________________________
Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné a jsou určeny pouze jeho adresátům.
Jestliže jste obdržel(a) tento e-mail omylem, informujte laskavě neprodleně jeho odesílatele. Obsah tohoto emailu i s přílohami a jeho kopie</pre>PIKAL Petr2014-11-18T10:48:28Help for x axis
http://comments.gmane.org/gmane.comp.lang.r.general/315139
<pre>Hi,
I want to customize x axis to scientific data. I do experiments with
different triggers. As others publications, I want that there is one
line for each trigger with the sign "-" or "+" to show if the trigger is
used or no. You will find attached an exemple.
Please find below a data.frame you could use to explain me.
Thank you for your response,
Olivier
set.seed(3)
sampleData <- data.frame(id = 1:100,gender = sample(c("0", "1"), 100,
replace = TRUE), smoke = sample (c("0","1"), 100, replace=TRUE), age =
rnorm(100, 40, 10))
summary(sampleData)
-> I want to give results with histograms or box.plot (age according to
sex and smoking status)
-> x axis may be like something like this :
Gender - - + +
Smoke - + - +
</pre>Olivier2014-11-17T15:24:03glmnet estimates and Tibshirani JRSSB 1996
http://comments.gmane.org/gmane.comp.lang.r.general/315138
<pre>Dear all,
I have a question that hopefully is an R question and does not simply arise from my lack of understanding of the LASSO.
The code below generates two different sets of relationships between y and X, one in which both variables matter (coefficients .5 each, line 14) and one in which one of the two will be shrunk to zero (coefficients .9 and .01, line 13). Lines 15-18 normalize by demeaning y and creating an orthonormal X matrix. I assign a "budget" of 0.5 to the coefficients (line 21). Line 31 translates this budget to the implied lambda in the Lagrangian form of the Lasso (one potential source of error, but I hope I read JRSSB equation 6 correctly here).
In the scenario in which both variables matter, everything works fine: the sum of the coefficients is 0.5 as intended, and the expressions from Tibshirani, eq 6 (lines 24,25), and those from glmnet agree. If, however, line 13 is switched on, so that the second coefficient gets shrunk to 0, the sum of the coefficients no longer equals the budget o</pre>Hanck, Christoph2014-11-17T10:49:29Dates in a data.frame
http://comments.gmane.org/gmane.comp.lang.r.general/315137
<pre>
Dear Contributors
I have a problem concerning the replication of a variable with
the date structure.
I have the following database of 12000 observations
bank.list.m:
name date
aba.1 ABA 2006-10-24
aba.2 ABA 2006-11-30
aba.3 ABA 2006-10-24
aba.4 ABA 2006-11-30
aba.5 ABA 2006-10-24
aba.6 ABA 2006-11-30
aba.7 ABA 2006-10-24
aba.8 ABA 2006-11-30
aba.9 ABA 2006-10-24
aba.10 ABA 2006-11-30
and the following with 960 obs.
day.spot
date spot
1 2006-01-02 1.1826
2 2006-01-03 1.1875
3 2006-01-04 1.2083
4 2006-01-05 1.2088
5 2006-01-06 1.2093
6 2006-01-09 1.2078
the date in the second database are a subset of the dates of the first
database.
What I need to do is to associate the value of the variable spot
reported in the second database, at the exact place of the corresponding
date in the first database.
I tried the following
dates<-table(bank.list.m$date)
test<-as.data.frame(dates)
dates.</pre>Francesca2014-11-17T11:49:47Implements XPath 2.0 in R
http://comments.gmane.org/gmane.comp.lang.r.general/315136
<pre>Many users of R would like the enhanced extraction capabilities of XPath
2.0, but only XPath 1.0 is available..
What would the best approach be to find someone to implement XPath 2.0 for
R (assuming that is a good idea)? What might the cost be and how would one
set this package development in motion?
Thanks
</pre>Rees Morrison2014-11-17T12:03:25I need help
http://comments.gmane.org/gmane.comp.lang.r.general/315135
<pre>I need your assistance on how to generate random replication of treatments
for nth row by jth col matrix for design of experiments.
thank you.
[[alternative HTML version deleted]]
</pre>aiyelabegan adijat2014-11-17T11:42:02Preprocessing with Caret package
http://comments.gmane.org/gmane.comp.lang.r.general/315134
<pre>Hi,
Please consider the following code
library (caret)
x=matrix(c(12:131),2)
p=preProcess(x, method=c("center","scale"));
x.prep=predict(p,x)
y.prep=x.prep[60,60]
How can I get the value of y (the value from y.pre not centered and not
scaled ) using p and y.prep?
Thank you!
Rui
[[alternative HTML version deleted]]
</pre>Ruima E.2014-11-17T16:30:39Newbie question: ROC function in TTR package
http://comments.gmane.org/gmane.comp.lang.r.general/315125
<pre>One of the great frustrations for a newbie to R is the documentation
uses the same syntax in its description as the items it is trying to
describe, a general no-no when giving language definitions. Why does the
documentation not include the equation being represented by the
function, thereby clarifying what the function is doing??
That gripe aside, can anyone explain to me what the rate of change (ROC)
function in the TTR package is doing? I have run it on a set of returns
and I cannot reverse engineer what it is calculating. Also, what is the
difference between the discrete and the continuous types?? Thanks.
wizardchef
</pre>Ernie Stokely2014-11-17T01:54:41Display two polygons in same map axes R
http://comments.gmane.org/gmane.comp.lang.r.general/315123
<pre>Hello,
I have two spatial map objects (reproducible example further down) which I would like to overlay in R. The ESRI shapefiles were read using:
library(rgdal)
Prairie.Boundaries <- readOGR(".", "boundaries")
watersheds<-readOGR(".","watersheds")
The two objects have same projection:
print(proj4string(watersheds))
[1] "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0"
print(proj4string(Prairie.Boundaries))
[1] "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0"
However, the spatial limits are different:
summary(watersheds)
Object of class SpatialPolygonsDataFrame
Coordinates:
min max
x -127.73835 -88.98395
y 45.44628 61.38249
Is projected: FALSE
proj4string :
[+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0]
summary(Prairie.Boundaries)
Object of class SpatialPolygonsDataFrame
Coordinates:
min max
x -120.00138 -88.99081
y 48.99668 60.00042
Is projected: FALSE
proj4string :
[+proj=longlat +datum=NAD83 +no_defs +ellps=GRS</pre>Zilefac Elvis2014-11-16T20:58:35package unmarked: distsamp vs gdistsamp vs pcount vs gpcount
http://comments.gmane.org/gmane.comp.lang.r.general/315122
<pre>Hello All,
I have been struggling with the following analysis in package 'unmarked':
I conducted repeated 10 min point counts over one season. I have 50 sites
(100 m radius) replicated over 3 surveys, and each individual observation
(n = 1108) is recorded at discrete distance intervals (i.e., the number of
observations for each site during each survey is not always equal). Habitat
variables were measured once for each site (n = 50), and detection
covariates were measured for each site on each survey (n = 150).
I wish to test the effect(s) of various habitat metrics on songbird
abundance/density, to include detection covariate(s) in my models, and to
account for repeated measures in my design. I think that 'distsamp' is most
appropriate for this, but am not sure (especially when it comes to how to
deal with repeated measures).
I have followed Chandler's 'Distance sampling analysis in unmarked (2011)'
and everything seems to work until I add detection covariates (using
distsamp; prior to adding abundance/d</pre>Rachel Field2014-11-16T18:56:37heston model simulation
http://comments.gmane.org/gmane.comp.lang.r.general/315118
<pre>Dear all,
I am using the following code for simulating Heston model. I am trying to
compare skewness with respect to different Rhos, but it doesn't seem to
work. Any body can tell me what is happening? I am using Euler-Maruyama
Monte Carlo. Here is my sample code. Any hints would be really appreciated.
theta=0.04
alpha=1.5
#delta=0.5
#rho=-0.9
n=100
m=1000
heston_sim<-function(rho,delta,m,mu){
s<-matrix(NA,n,m)
v<-matrix(NA,n,m)
for (j in 1:m){
for (i in 2:n) {
s[1,j]=2
v[1,j]=0.4
dt=1/100
zv<-rnorm(1)
zs<-rnorm(1)
zx<-rho*zv+sqrt(1-rho^2)*zs
w1<-zv*sqrt(dt)
w2<-zx*sqrt(dt)
s[i,j]=s[i-1,j]+(mu-0.5*max(v[i-1,j],0))*dt+sqrt(max(v[i-1,j],0))*w2
v[i,j]=v[i-1,j]+alpha*(theta-v[i-1,j])*dt+sqrt(max(v[i-1,j],0))*delta*w1
}
}
return(s)
}
s1<-heston_sim(-1,0.1,1000,0)
s2<-heston_sim(0,0.1,1000,0)
s3<-heston_sim(0.7,0.1,1000,0)
a1<-c(diff(s1,lag=1)*100)
a2<-c(diff(s2,lag=1)*100)
a3<-c(diff(s3,lag=1)*100)
plot(density(na.omit(a1),bw=0.5),main="",ylim=c(0,0.2))
lines(density(na.omit(a2),bw=0.5),col=2)
lines(dens</pre>jun wang2014-11-16T16:27:59Using factors to analyze table by quantiles
http://comments.gmane.org/gmane.comp.lang.r.general/315117
<pre>Hello all,
I've been trying to do the following analysis. I have a table (T1) that
defines sizes of my datasets (~80k rows):
size
X1 1000
X2 8323
X3 58
And then I have a table (T2) of ~ 5 million significant overlaps between
datasets:
X234 X443
X323 X1
X998 X12
What I want to do, is split table T1 into 10 quantiles by "size", which I
seem to successfully achieve using these commands:
qq <- factor(cut(T1$size,quantile(T1$size,
probs=seq(0.0,1.0,by=0.1)),include.lowest = TRUE),labels = LETTERS[1:10])
table(qq)
A B C D E F G H I J
8204 7643 7941 7878 7867 7773 7913 7856 7894 7869
Now I need to count how many of all 100 possible combinations
(AA,AB,AC,etc) are present in table T2 using these factors.
How can I do that? Thank you in advance,
</pre>Alexander Predeus2014-11-16T07:53:28Problem on annotation of Deseq2 on reportingtools
http://comments.gmane.org/gmane.comp.lang.r.general/315116
<pre>Dear all!,
I use this code:
dds <- DESeq(ddHTSeq)
res <-results(dds)
#reporting
library(ReportingTools)
library("org.Hs.eg.db")
des2Report <- HTMLReport(shortName ='RNAseq_analysis_DESeq2.html',title ='RNA-seq analysis of differential expression using DESeq2 ',reportDirectory = "./Reports")
#publish(dds,des2Report,pvalueCutoff=0.05,annotation.db="org,Hs.eg.db")
publish(dds,des2Report,pvalueCutoff=0.01,annotation.db="org.Hs.egENSEMBL2EG",factor=colData(dds)$condition,categorySize=5)
finish(des2Report)
and I have this error:
Error in results(object, resultName) :
'contrast', as a character vector of length 3, should have the form:
contrast = c('factorName','numeratorLevel','denominatorLevel'),
see the manual page of ?results for more information
is.factor(colData(dds)$condition)
[1] TRUE
What can I do?
sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US</pre>jarod_v6< at >libero.it2014-11-16T18:25:32quantreg speed
http://comments.gmane.org/gmane.comp.lang.r.general/315107
<pre>Hi all,
I'm using quantreg rq() to perform quantile regression on a large data set.
Each record has 4 fields and there are about 18 million records in total. I
wonder if anyone has tried rq() on a large dataset and how long I should
expect it to finish. Or it is simply too large and I should subsample the
data. I would like to have an idea before I start to run and wait forever.
In addition, I will appreciate if anyone could give me an idea how long it
takes for rq() to run approximately for certain dataset size.
Yunqi
[[alternative HTML version deleted]]
</pre>Yunqi Zhang2014-11-15T20:12:14Using OpenBLAS with R
http://comments.gmane.org/gmane.comp.lang.r.general/315106
<pre>Greetings. I'd like to get some advice about using OpenBLAS with R, rather
than using the BLAS that comes built in to R.
I've tried this on my Fedora 20 system (see the appended for details). I ran
a simple test -- multiplying two large matrices -- and the results were very
impressive, i.e., in favor of OpenBLAS, which is consistent with discussions
I've seen on the web.
My concern is that maybe this is too good to be true. I.e., the standard R
configuration is vetted by thousands of people every day. Can I have the same
degree of confidence with OpenBLAS that I have in the built-in version?
And/or are there other caveats to using OpenBLAS of which I should be aware?
Thanks.
</pre>Michael Hannon2014-11-16T00:11:25Could you remove me from the mailing list please?
http://comments.gmane.org/gmane.comp.lang.r.general/315103
<pre>I do not have my login information anymore but I do not want to receive any
R help emails again.
Thank you.
[[alternative HTML version deleted]]
</pre>Henry Chen2014-11-15T20:08:30Help in code for fitting a growth model
http://comments.gmane.org/gmane.comp.lang.r.general/315099
<pre>I have to fit a model to growth data of Hevea (rubber) trees. The details
are outlined in the attached docx file. Kind help is solicited.
</pre>Chandrasekhar Rudrappa2014-11-15T16:14:17request
http://comments.gmane.org/gmane.comp.lang.r.general/315097
<pre>Respected sir i am a student of Mphil statistics from pakistan, please i have a great problem and i try my best but can not solve, sir the problem is that i want to estimate the parameters of LN3 for a set of data having name x by MLE method, in R, i also apply the VGAM package but can not solve because it give us the two parameters, please send me the command and package in detail, i will be always pray for you, i spend my one month but not solve it, please once again
[[alternative HTML version deleted]]
______________________________________________
R-help< at >r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
</pre>Muhammad Alam2014-11-15T11:30:16Fine controlling "three dots" argument dispatch to functions with identical argument names
http://comments.gmane.org/gmane.comp.lang.r.general/315095
<pre>Dear list,
I wonder if there's a clever way to fine control the exact way arguments
are dispatched via R's "three dots" argument ....
Consider the following use case:
- you have a function foobar() that calls foo() which in turn calls bar()
- *both* foo() and bar() have an argument that's called y, but they each
have a *different meaning*
- in the call to foobar(), you would like to say "here's the y for foo()
and here's the y for bar()". *That's what I would like to accomplish*.
If you simply call foobar(x = "John Doe", y = "hello world"), y only get's
dispatched to foo() as in the call to bar() things would have to be
explicit in order to be dispatched (i.e. the call would have to be bar(x =
x, y = y) instead of bar(x = x, ...):
foo <- function(x, y = "some character", ...) {
message("foo ----------")
message("foo/threedots")
try(print(list(...)))
message("foo/y")
try(print(y))
bar(x = x, ...)}
bar <- function(x, y = TRUE, ...) {
message("bar ----------")
message("bar/th</pre>Janko Thyson2014-11-15T14:49:41Prediction using ARCH
http://comments.gmane.org/gmane.comp.lang.r.general/315092
<pre>Hi,
I have two variables, FTSE100 and CPI . Call them Y and X respectively.
I want to fit an ARCH(1) to model Y on X. I also intend to predict the
values of Y for future (given) values of X. How can I use R for such
prediction?
Another question is: is there a way I can call an R function which would
return me the optimal p for the ARCH(p) model?
I have attached the Excel data in case it is required.
Thanks,
Preetam
</pre>Preetam Pal2014-11-15T10:23:22Search EngineSearch the mailing list at Gmanequery
http://search.gmane.org/?group=$group=gmane.comp.lang.r.general