Dear Friends,
I have started to write some codes for RSTAN, I have a general question
regarding likelihood function.
Below you can see a simple structure of RSTAN model. For most of the codes, in
the "model" block, I saw priors (hyperpriors) and likelihood functions.
In a few programs, I don't s
Dear Friends,
I would like to see my legend outside of a ggplot (at the top).
This code is showing the legend inside of a plot:
theme(legend.position=c(0.15,0.97))
But when I changed it to : theme(legend.position=c(-0.15,1.5)) , the legend
disappears.
I would appreciate it if you share your id
Dear Friends,
I am running a simple code for rinla. The INLA package is installed
successfully on Rstudio.
But when I run inla (y~x,..) function, I get the following error: could not
find function "inla"
Did anybody have the same problem before?
I would appreciate it if any information is
Dear Friends,
I am trying to add two time series curves into one plot. I don't get any error
but the lines are not added to my plot.
I am trying the following code;
1) df <- as.data.frame (read_excel("C:/Users/NO2.xlsx", "trend))
2) plot(df$year, df$Nation, type="o", col="blue", lty=1, ylab="ch
Hello,
I have installed all packages successfully in order to unpack a source package.
I am still getting error when I run: install.packages ("package.tar.gz', repos
= NULL, type = "source").
Is that possible my system doesn't allow Rstudio to compile some information in
C++ ?
My colleague is
Dear all,
I have the following table for a breast cancer study and I was trying to
calculate the odds ratio of different subtypes based on AR (AR+ as the base
case).
AR- AR+Luminal A 1 19Luminal B 1 15Her2
0 4Basal-like 20 1Normal Like 2
Using the same data, if I ran
fit2
<-glm(formula=AR~Age+LumA+LumB+HER2+Basal+Normal,family=binomial,data=RacComp1)summary(fit2)exp(coef(fit2))
I obtained:
> exp(coef(fit2))(Intercept) Age LumA LumB HER2
> Basal Normal 0.24866935 1.00433781 0.10639937
dx) find_overlapped_gene(idx,
all_genes_gr)))
However, for 100 genes, it use nearly ~8s by system.time().That means if I
had 5 genes, nearly one hour for just find overlapped gene.
I am just wondering any algorithm or strategy to do that efficiently,
perhaps 5 genes in ~1
Hi All,
I am trying to use xts and xtsExtra packages to plot multiple time series
on one plot.
I got two questions about this package.
What's the meaning of "*The following object is masked from ‘package:xts’:*"
when load xts and xtsExtra?* which plot.xts will be available if I local
xts first a
Dear all:
I have a list like that,which is a standard str_locate_all() function
(stringr package) output:
$K
start end
$GSEGTCSCSSK
start end
[1,] 6 6
[2,] 8 8
$GFSTTCPAHVDDLTPEQVLDGDVNELMDVVLHHVPEAK
start end
[1,] 6 6
$LVECIGQELIFLLPNK
start end
[1,] 4
Hi dear R-users,
I encountered an interesting pattern. Take for example the function
combn(), I copied and pasted the function definition and saved it as a new
function named combn2() (see the end of this email). As it turned out,
combn2() seems to be substantially slower than the original functio
Hi,
I am using the densCols to draw a high volume scatter plot. Instead of
using the default local density, I would like to take log of the local
density and then map them to the colors. I could not figure out how to do
that.
For example:
plot(x,y,col=densCols(x,y,"log")) ?
Any help would be app
That's a good one, Using cumsum + rowsum would definitely be faster,
On Tue, May 21, 2013 at 6:40 AM, José Verhoeven wrote:
> Thank you, that really worked. Actually received an even shorter version:
>
>
> rowSums((t(apply(D > 0, 1, cumsum)) <= 3) * D)
>
>
>
&
)
#add a right parenthesis.
mat
On Tue, May 21, 2013 at 3:47 AM, Xiao He wrote:
> Does this work? Probably not the fastest, but I think it does the job.
>
> foo<-function(x){
> temp=x[x>0]
> if(length(temp)>=3) sum(temp[1:3])
> else sum(temp)
>
> set.seed(2)
Does this work? Probably not the fastest, but I think it does the job.
foo<-function(x){
temp=x[x>0]
if(length(temp)>=3) sum(temp[1:3])
else sum(temp)
set.seed(2)
mat<-matrix(sample(0:4, 25, replace=T, prob=c(1/2,rep(1/8,4)), ncol=5)
mat
# [,1] [,2] [,3] [,4] [,5]
#[1,]012
Dear R-users:
Hi, I read here (
http://stackoverflow.com/questions/2287616/controlling-digits-in-r) that R
is only accurate up to the 15th decimal place, despite the fact that if you
choose to display more decimal places, it will. I wonder if R uses the
information beyond the 15th decimal place in
xed effect estimates
As asreml-R is not free ,is there any packages for my study?
I heard nlme or lme4 but I'm not sure whether they could incorporate
covariates and what about their computational efficiency?
Thanks for you recommendation
Yao He
—
Master candid
xed effect estimates
As asreml-R is not free ,is there any packages for my study?
I heard nlme or lme4 but I'm not sure whether they could incorporate
covariates and what about their computational efficiency?
Thanks for you recommendation
Yao He
—
Master candid
of pairs of A, C, G, T, then two pairs e.g., 'AA' 'CT'
>> could be encoded as a single byte
>>
>> alf <- c("A", "C", "G", "T")
>> nms <- outer(alf, alf, paste0)
>> map <- outer(setNames(as.r
49401
292 38954 49396 4939749398 49399
291 39003 49392
library (plyr) and library (reshape2) and other good packages are OK for me.
Thanks a lot!
Yao He
—
Master candidate in 2rd year
Department of Animal genetics & breeding
0
> 2611 2611 0
> ", header = TRUE)
>
> mat1 <- matrix(nrow = 53, ncol = 53) # initialize with NA's
> mat1[upper.tri(mat1, diag = TRUE)] <- dat$value
>
> mat2 <- matrix(0, nrow = 53, ncol = 53) # initialize with zeros
> mat2[upper.tri(mat2, diag = TRUE)] &
3.167
> head(res1,3)
>
> # AA AG CC CT GA GG GT TC TG TT
> # 1 29 10 0 0 13 1 0 0 0 0
> # 10 0 4 0 0 6 43 0 0 0 0
> # 100 19 15 0 0 15 4 0 0 0 0
> head(res2,3)
> # id AA AG CC CT GA GG GT TC TG TT
> #1 1 29 10 0 0 13 1 0 0 0 0
Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
>> Behalf
>> Of Yao He
>> Sent: Wednesday, January 09, 2013 4:04 PM
>> To: jim holtman
>> Cc: R help
>> Subject: Re: [R] how to count "A", "C&
Thanks a lot.
The problem is that I don't know how to handle the output list as I
want calculate the frequency of A or G or T or C by row.
Yao He
2013/1/10 Jessica Streicher :
> Sorry, you wanted rows, i wrote for columns
>
> #rows would be:
> test2<-apply(test[,-c(1:4)],1,f
", "GG"), X2476 = c("AA",
> "TT", "TT", "CC", "TT", "CC", "CC", "TT", "CC", "GG", "GG",
> "GG", "GG", "GT", "TC"
Hi,this is a question about how to set the scale,try this
add a scale_x_discrete() like that:
plot <- tmpplot + geom_line()+scale_x_continuous(breaks=ii)
Yao He
2013/1/8 Francesco Sarracino :
> Dear R helpers,
>
> I am currently having hard time fixing the values on the x-ax
4018 -9.265622 3.058955
> #EW.INCU 49.61333 47.08333 0.43689727 -7.119234 12.179234
> A.K.
>
>
>
>
> - Original Message -
> From: Yao He
> To: arun
> Cc: R help
> Sent: Monday, January 7, 2013 10:57 AM
> Subject: Re: [R] how to aggregate T-test result in an e
",row.names(res1))])
> res1
> # meanp.value
> #EMW.13% 14.35000 0.09355374
> #EMW.21% 17.68000 0.09355374
> #EW.17.5.13% 42.87000 0.17464018
> #EW.17.5.21% 45.97333 0.17464018
> #EW.INCU.13% 49.61333 0.43689727
> #EW.INCU.21% 47.08333 0.43689727
>
> A.K.
&g
, is that generate a
high-dimension array a good way ?
Thank you!
Yao He
2013/1/7 arun :
> HI,
> I tried to create an example dataset (as you didn't provide the data).
> set.seed(25)
> a<-array(sample(1:50,60,replace=TRUE),dim=c(2,10,3))
> dimnames(a)[[1]]<-c("1
print(O2[2])
print(t.test(a[O2[1],,i],a[O2[2],,i],na.rm=T))
}
I don't think it is an elegant way and I am inexperience to report raw result.
Could you give me more help?
Yao He
2013/1/7 arun :
> Hi,
> You didn't provide any example data. So, I am not sure whether this helps.
&
eport raw result.
Can anybody give me some pieces of advice?
Yao He
—
Master candidate in 2rd year
Department of Animal genetics & breeding
Room 436,College of Animial Science&Technology,
China Agriculture University,Beijing,100193
E-mail: yao.h.1
ad it in one time?
I think the core problem is that I can't create different objects'
name in the use of loop or sapply() ,but there may be a better way to
do what I want.
Thanks a lot
Yao He
Yao He
--
—
Master candidate in 2rd year
Department
,1],mean)
But I couldn't set the agrument na.rm=T in the mean() function,so the
results are all NAs
Please tell me how to handle NA values in the use of aggregate()
Thanks a lot
Yao He
—
Master candidate in 2rd year
Department of Animal genetics & breeding
Room 436,C
es(x=factor(FID),y=..count..,fill=STATUS))
But how could I exclude "nosperm" or other levels just in the use of
ggplot2 without generating another dataframe
Thanks a lot
Yao He
Master candidate in 2rd year
Department of Animal genetics & breeding
Room 4
To someone who may concern,
I want to continue the submission. of r-help list.
Thanks a lot!
Chen
--
Best Regards,
Yours,
Chen He
PhD Candidate
Institute of Population Research
Peking University, Beijing, China
[[alternative HTML version deleted
stype = "i", simple = TRUE)
>
>
> Bootstrap Statistics :
> original bias std. error
> t1* 500.5 0.76209 8.876232
>
>
> But your error message shows a typo in 'simlpe' so, check your typing.
>
> Also, 'c', 'table' and
I am doing boot with a large database, thus want to use simple=TRUE to
reduce the memory used.
I alreday set up sim="ordinary", stype="i" , but I don't know how to
set "n=0". In fact, I don't know what does "n=0" mean?
For example,
a<-c(1:1000)
b<-c(2:1001)
c<-cbind(a,b)
library(boot)
table<-func
tions?
Thank you very much in advance. I will be really appreciated for your
time and help.
Best wishes,
He
__
R-help@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.
Dear Michael,
Thanks very much.
Jiang
On Tue, Oct 4, 2011 at 2:39 PM, R. Michael Weylandt <
michael.weyla...@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 10:08 PM, chunjiang he wrote:
> > Hi,
> >
> > I have two questions want to ask.
> >
> > 1. If I have a
r it also gives other people the opportunity to
> reply if they have more to add.
>
> Francois
>
> On Sep 30, 2011, at 15:07 , chunjiang he wrote:
>
> > Hi Francois,
> >
> > Thansk for your reply. I did BH correction manually. Just use corrected
> pvalue=pval
Hi,
I have two questions want to ask.
1. If I have a matrix like this, and I want to figure out the rows whose
value in the 3rd column are less than 0.05. How can I do it with R.
hsa-let-7a--MBTD10.5282391972.41E-05
hsa-let-7a--APOBEC10.5078694095.51E-05
hsa-let-7a--PAPOLA0.47
Hi,
There is a question that I am confused.
I have a set of data like this:
hsa-miR-205--GATA30.797882767 1.08E-13
hsa-miR-205--ITGB4 0.750217593 1.85E-11
hsa-miR-187--PGF0.797604155 3.24E-11
hsa-miR-205--SERPINB5 0.744124886 3.28E-11
hsa-miR-205--PBX1 0.734487224 7.89E-11
hsa-mi
an geoadditive relative survival analysis of registry data on breast
cancer mortality use Bayesian relative survival analysis. Hence, i was
wondering if this is possible in R.
Thanks a lot.
Your Sincerely,
Vincent He
__
R-help@r-project.org mailing li
as wondering if this is possible in R.
Thanks a lot.
Your Sincerely,
Vincent He
[[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 http://ww
breast cancer
mortality. <http://epub.ub.uni-muenchen.de/1881/1/paper_515.pdf> use Bayesian
relative survival analysis. Hence, i was wondering if this is possible in R.
Thanks a lot.
Your Sincerely,
Vincent He
[[alternative HTML version deleted]]
_
Hi,
Does anybody use girafe to analyze .sam file extracting from bowtie.
Some example is better.
thanks so much,
Jiang
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLE
Hi, there:
Is there any quick function to generate bivariate or multivariate gamma
distribution?
Thanks.
Yulei
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
Hi, all,
I have a question on the "acf" function in time sereis analysis. After I run
the function
>acf(data);
I got two blue lines above and below the x axis. I guess they are confidence
inverval borders, right?
Could someone tell me what the confidence level is for the blue lines? Is
there some
Hi, there.
Suppose I already have sensitivities and specificities. What is the quick
R-function to calculate AUC for the ROC plot? There seem to be many R functions
to calculate AUC.
Thanks.
Yulei
[[alternative HTML version deleted]]
__
R-
e is correct, however, there is no data in that file.
The character variable id has different "values" like 1.00 =
"000CF7CC", where 000CF7CC should be in the tab of data view instead
of variable view.
4) Try to open "res.dat"
It comes
Hi,
I am also doing PCA.
Is the following right for extracting the scores?
library(psych)
pca<-principal(data,nfactors=,rotate="varimax",scores=T)
pca$loadings
pca$score
Best regards,
He
On Tue, Nov 30, 2010 at 10:22 AM, Liviu Andronic wrote:
> Dear all
> I'm unab
ard is less
than 0. 2) i dont know how to explain the fitness of the model.
Any suggestion about the methods or results will be really appreciate. Thank
you again.
Best wishes,
He
>
>
>
>
>
>
> > Date: Mon, 29 Nov 2010 09:26:07 +0
-- Forwarded message --
From: He Zhang
Date: Tue, Nov 30, 2010 at 11:26 AM
Subject: Re: [R] Evaluation of survival analysis
To: Mike Marchywka
Cc: r-help@r-project.org
On Tue, Nov 30, 2010 at 1:18 AM, Mike Marchywka wrote:
>
>
> Hello Mike,
>
Thank you very m
r terms= 0.4 2.1 1.0
Likelihood ratio test=48.2 on 1.5 df, p=1.18e-11
I really appreciate for your help. Thank you very much in advance.
Best wishes,
He
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.c
Hi, there:
Suppose I want create variables with indexes in their names, e.g., X_1_1,
X_1_2, X_1_3, ..., X_1_10, X_2_1, X_2_2, X_2_3, .. X_2_10,..., X_10_1, X_10_2,
... X_10_10. It looks like I need to use 2 indexes I and J so I is looped from
1 to 10, and J is looped from 1 to 10. But I don't
Dear R users,
I posted a couple of questions and got no response, so I am giving it
another shot.
I ran an experiment with a TWO-WAY within subject design. A sample dataset
is in http://www-scf.usc.edu/~hex/data.txt
I already ran ANOVA by using the following formula:
aov(RT~Factor1*Factor2 + Er
Sorry, that in the last message the tables were messed up. Here is a link to
the tables http://www-scf.usc.edu/~hex/data.txt
<http://www-scf.usc.edu/~hex/data.txt>Thanks!
On Sun, Jun 6, 2010 at 10:18 AM, Xiao He wrote:
> Dear R people,
>
> I have a couple of questions about po
Dear R people,
I have a couple of questions about post-doc analyses for 2 by 2 within
subjects ANOVA. I conducted a psycholinguistic study that combined a 2 by 2
design and a latin square design. Specifically, I had 32 items each of which
generated 4 conditions. Participants saw each of the 32 ite
com.
>
> __
> R-help@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, repro
inux-tp1562060p1564632.html
> Sent from the R help mailing list archive at Nabble.com.
>
>
> __
> R-help@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
Hi Folks,
I want to apply cluster analysis on a categorical data set, could you
recommend me some R package and suggestion?
Thanks!
Dong
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
Dear all:
I am using R function bwplot to plot box plots. I would like to change some
parameters of the typical box plots. For example, I would like to try different
types of whisker lines. I can use whiskerline=x in boxplot function but not in
bwplot function. Could you tell me how I can do it
Hi, there:
I have a dataset with 50 states and for each state, I have its associated mean
estimate (for some parameters) and the lower and upper bound of the 95% CI. The
data look like below:
state ami_mean ami_low ami_up
1 MS -0.58630 -0.90720 -0.29580
2 KY -0.48100 -0.75990 -
Hi, there.
I am looking for a package to fit the following binomial-normal model
Y_ij ~ Binomial (N_ij, P_ij)
Logit(P_ij) = \beta_0i+\beta_1*X+e_ij
\beta_0i ~ N(\beta_0,\sigma_b^2)
e_ij ~ N(0,\sigma^2)
This model has two variance components, one random effect \beta_0i and
one error e
airo and pango and gtk before, and I think
these libraries are duplicated in /usr/lib somehow.
I don't know if R looked into the wrong directory to search for
libraries or not.
Please advise!
Thanks a lot.
--
Zhesi He
Graham Group, CNAP
Department of Biology (Area 7)
University of Yo
Hi, there:
Does anyone know how to specify the ranges in the axises when I make
scatter plots using pairs()? In the general plot function, I can use
xlim and ylim option. But how can I do this if I use pairs()?
Thanks.
Yulei
[[alternative HTML version deleted]]
___
1[i,1] == dat2[j,1] & dat1[i,2] == dat2[j,2]) print (j)
}
}
On 5/11/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Not exactly. I need something to subset ONLY rows common to both
>
t know why, but this is not working as I was expecting. Any
> > > suggestion to improve my code?
> > >
> > > Thanks in advance
> > >
> > > Justin
> > > --
> > >
> > > [EMAIL PROTECTED]
> > >
> > > --
&
Hi, there:
Could someone tell me a simple function of plot ROC curve and calculate
AUC in R? My setting is very simple, a column of the true binary
response and another column of predicted probabilities.
Thanks!
Yulei
[[alternative HTML version deleted]]
__
Dear R user:
I am using R2WinBUGs to call WinBUGS from R. But I have some problems in
using either the option bugs.seed and summary.only in the function bugs.
Here are the programs and error messages. It appears that if I don't use
either option, the program runs fine. I am using R2.5.1 and Win
Dear All:
I want to estimate a simple recursive mode in R. Which package should I use?
Thank you very much in advance.
Yongfu He
_
[[alternative HTML version deleted]]
__
R
Dear everyone:
I am a new user of R. I have a dataset with a dependent variable (DV) censored
at different values. The dataset looks like,
conditions .IDV1 IDV2DV
12 4 89
16 6 75
14 5 0 ( DV<=7
;
> [[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 http://www.R-project.org/posting-guide.html
> and provide
73 matches
Mail list logo