[R] Predicition and CI for lognormal model

2016-10-31 Thread Chien-Pang Chin
Hi, everyone I have a model like. cpue=catch*1000/Hook glmmodel=glm(log(cpue)~yy+qq+cc+pp, family=gaussian) and I want to estimate yy, qq, cc, pp effect and CI A senior scientist suggested to use model <- cbind(yhat=predict.glm(glmmodel, se.fit=T), DATA

[R] Beta distribution approximate to Normal distribution

2015-09-15 Thread Chien-Pang Chin
Hi, I need to generate 1000 numbers from N(u, a^2), however I don't want to include 0 and negative values. How can I use beta distribution approximate to N(u, a^2) in R. Thx for help __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, se

[R] loop, list() and non-numeric argument to binary operator

2010-09-15 Thread Chien-Pang Chin
Hi all: I have a problem when I want to do operation a sequence or matrix created by loop and list() or data.frame(). Here is the example. > for(i in 1:n) (k[i]=list(c(0:max[i]))) > k[1]+1 Error in k[1] + 1 : non-numeric argument to binary operator What should I do to correct this pro

[R] loop, list() and non-numeric argument to binary operator

2010-09-15 Thread Chien-Pang Chin
Hi all: I have a problem when I want to do operation a sequence or matrix created by loop and list() or data.frame(). Here is the example. > for(i in 1:n) (k[i]=list(c(0:max[i]))) > k[1]+1 Error in k[1] + 1 : non-numeric argument to binary operator What should I do to correct this pro

[R] Solver in R

2010-09-10 Thread Chien-Pang Chin
Hi all: I'm looking for a package that similar to solver in MS. All I need is find a r to satisfy R0=sum( r * Xt ), where t are from 1 to n and Xt are come from another formula. The most package I found were to max or min the obj. function. Is there any package can do it? Thanks. Peter