Re: [R] How to scale circle sizes in VennDiagram using draw.triple.venn

2016-12-22 Thread Yung-Chih Lai
gt; > HTH > Ulrik > > Yung-Chih Lai schrieb am Fr., 16. Dez. 2016, > 21:40: > >> Hi, >> >> >> The below is the command I used to create a Venn diagram with three sets. >> However, the three circle sizes are the same. Could you show me how to >

[R] How to scale circle sizes in VennDiagram using draw.triple.venn

2016-12-16 Thread Yung-Chih Lai
Hi, The below is the command I used to create a Venn diagram with three sets. However, the three circle sizes are the same. Could you show me how to adjust the circle size based on the area size? Many thanks. grid.newpage() draw.triple.venn(area1 = 9737, area2 = 13329, area3 = 6300, n12 = 8612,

[R] Heteroscedasticity in a percent-cover dataset

2016-04-15 Thread Lai Wen Ya Samantha
Hi, I am currently trying to do a GLMM on a dataset with percent cover of seagrass (dep. var) and a suite of explanatory variables including algal (AC) and epiphyte cover (EC), rainfall, temperature and sunshine hours. M2=glmer(SG~AC+EC+TP+SS+RF+(1|Location/fSi/fTr), family=binomial,data=data,n

[R] variance of yBar.. for unbalanced a random effects model

2012-09-16 Thread Han-Lin Lai
Hi All, I am analyzing a set of data collected by two-stage cluster sampling. My model is y_ij = mu + T_i + e_ij where T_i is the ith treatment and e_ij is random error for the ijth individual. I have MSE_within and MSE_between, which lead to MSE_T for the model. Suppose I have balanced data whe

Re: [R] Bug or feature? sum(c(a, b, c)) != (a + b + c)

2011-08-23 Thread Daniel Lai
Hi Barry, Shock and horror indeed, addition is not _associative_, at least for floating point arithmetic [1]. Flipping the order of the operands seems to be the explanation of the discrepancies between R and MATLAB as you suggest: In R: a = 0.812672 b = 0.916541 c = 0.797810 sprintf('%.30f'

[R] Bug or feature? sum(c(a, b, c)) != (a + b + c)

2011-08-23 Thread Daniel Lai
Greetings all, I'm porting an algorithm from MATLAB to R, and noticed some minor discrepancies in small decimal values using rowSums and colSums which are exacerbated after heavy iteration and log space transformation. This was rather perplexing as both programs claimed and appeared to use th

[R] Feature selection via glmnet package (LASSO)

2010-07-30 Thread Lai Jiang
like only 10, based on my easy dataset. I try to connect the choice of lambda to the selecting numbers, but it seems the choice is close to 0 and very sensitive. Can someone help me or point me to another package to do that? Thanks.

[R] About the risk code in the fportfolio package

2010-02-03 Thread lai
Hello, I have a problem with fPortfolio recently. I am using below code: Data = read.table("hf.txt",header = TRUE,sep = "") Data = Data[, c("CA", "SS", "EM", "EMN", "ED", "DS", "MS", "RA", "FIA", "GM", "LSE", "MF", "SP500", "NASDAQ", "JPM")] d = as.timeSeries(Data) class(d) Spec = portfolioSpe

[R] plot.cuminc: how to put tick marks for censored observations

2008-08-27 Thread Kuan-Chi Lai
Hi, I am trying to figure out how to put tick marks for censored observations using plot.cuminc for my competing risk analysis (survfit does this automatically). I've searched online for resources but found nothing. Does anybody know how to do this? Thank you in advance for your input. KC