search for: yanwei

Displaying 20 results from an estimated 26 matches for "yanwei".

2011 May 16
4
Problem on glmer
...0.0005085944 Random effects: Formula: ~1 | CL (Intercept) Residual StdDev: 0.8313193 0.5346455 Variance function: Structure: fixed weights Formula: ~invwt Number of Observations: 700 Number of Groups: 100 > fit2 Error in asMethod(object) : matrix is not symmetric [1,2] Wayne (Yanwei) Zhang Statistical Research CNA Email: Yanwei.Zhang@cna.com<mailto:Yanwei.Zhang@cna.com> NOTICE: This e-mail message, including any attachments and appended messages, is for the sole use of the intended recipients and may contain confidential and legally privileged information. If you ar...
2010 Jan 03
5
update packages from local
Hi all, I have an old package installed, say "abc". Now I made some changes to the source, and built a new version of the source code "abc_0.1.1.tar.gz". How can I update the old package to this newer version from the local tar.gz file? I was running the following, but it did not work. setwd("directory where the tar.gz file locates")
2008 Aug 08
3
Multivariate regression with constraints
...3.698 0.00767 ** One can see that in the second regression, i.e. R2~-1+p1+R1, the coefficient for p1 is not significant. I wonder if I can run this bivariate regression again with the constraint that the coefficient for p1 in the second regression equation is zero? Thanks a lot. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Aug 04
2
Multivariate Regression with Weights
...ictors, like the WLS in the univariate case. y_1~x_1+x_2 y_2~x_1+x_2 var(y_1)=x_1*sigma_1^2 var(y_2)=x_2*sigma_2^2 cov(y_1,y_2)=sqrt(x_1*x_2)*sigma_12^2 How can I specify this in R? Is there a corresponding function to the univariate specification lm(y~x,weights=x)?? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2011 Sep 07
1
Fwd: FSelector and RWeka problem
Hi all, Although I sent the mail to Piotr, the author of FSelector, it should be better to ask here to let others know. Yanwei Begin forwarded message: From: Yanwei Song <yanwei.song@gmail.com> Date: September 7, 2011 4:41:58 PM EDT To: p.romanski@stud.elka.pw.edu.pl Subject: FSelector and RWeka problem Dear Piotr, Thanks for developing the FSelector package for us. I'm a new R beginner, and trying to use...
2008 Jul 30
2
Sampling two exponentials
...ing to sample two variables from two exponential distributions, but I want to specify a covariance structure between these two variables. Is there any way to do it in R? Or is there a "Multivariate Exponential" thing corresponding to the multivariate normal? Thanks in advance. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Aug 07
4
Switch two rows in a matrix
...]=b[,3] > c[,3]=b[,2] > c [,1] [,2] [,3] [,4] [1,] 0.33833811 -0.06181611 -0.9422273 -1.8346134 [2,] 0.07811688 -1.61262688 0.1338694 0.2988365 [3,] -0.68167996 0.71079887 0.2004836 -1.1590184 [4,] 0.21869786 -0.13694344 -1.6356661 -1.2121355 Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Jul 25
3
Numerical question
...all, I have n independent variables A_1, A_2, A_3,......,A_n, and each with known variances var(A_1), var(A_2),..., but unknown mean. How can I get the approximation of the variance of the product of the variables using numerical computation, i.e. var(A_1*A_2*A_3*.....*A_n)? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Jul 23
1
Questions on weighted least squares
...sim2=matrix(0,n,1) > for (i in 1:(n)){ + sim2[i]=rnorm(1,sim1[i]*b1,sqrt(sim1[i])*50) + } > fit1=lm(sim2~-1+sim1,weights=sqrt(sim1)*50) > coef(fit1) sim1 1.116028 > y=sim2/(sqrt(sim1)*50) > x=sim1/(sqrt(sim1)*50) > fit2=lm(y~-1+x) > coef(fit2) x 1.116273 Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Aug 07
1
Covariance matrix
Hi all, Assume I have a random vector with four variables, i.e. A=(a,b,c,d). I am able to get the covariance matrix of vector A, but how can I get the covariance matrix of vector B=(a,c,b,d) by manipulating the corresponding covariance matrix of A? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2010 Sep 09
5
Help on simple problem with optim
...: Warning messages: 1: In dnorm(x, mean, sd, log) : NaNs produced 2: In dnorm(x, mean, sd, log) : NaNs produced I would really appreciate if anybody would help to point out the problem with this code or tell me how to trace it down (using "trace"?)? Many thanks in advance. Wayne (Yanwei) Zhang Statistical Research CNA NOTICE: This e-mail message, including any attachments and appended messages, is for the sole use of the intended recipients and may contain confidential and legally privileged information. If you are not the intended recipient, any review, dissemination, distr...
2010 Sep 02
1
Help on glm and optim
...fit2 <- optim(theta, loglik, clotting, gr = NULL, hessian = TRUE, control = list(fnscale = -1)) # Then I got the following error message: Error in optim(theta, loglik, clotting, gr = NULL, hessian = TRUE, control = list(fnscale = -1)) : non-finite finite-difference value [3] Wayne (Yanwei) Zhang Statistical Research CNA Phone: 312-822-6296 Email: Yanwei.Zhang@cna.com<mailto:Yanwei.Zhang@cna.com> NOTICE: This e-mail message, including any attachments and appended messages, is for the sole use of the intended recipients and may contain confidential and legally privileged in...
2010 Feb 26
1
S4 programming
...ic",y="character",z="numeric")) [1] "abc" > xxx=new("abc",x=1,y="a",z=2) > xxx$a Error in xxx$a : $ operator not defined for this S4 class > length(xxx) [1] 1 > xxx[[1]] Error in xxx[[1]] : this S4 class is not subsettable Wayne (Yanwei) Zhang Statistical Research CNA NOTICE: This e-mail message, including any attachments and appended messages, is for the sole use of the intended recipients and may contain confidential and legally privileged information. If you are not the intended recipient, any review, dissemination, distr...
2009 Jun 15
1
Create R object
...2. I want to validate whether all of the "object"s have the same dimension, that is, whether dim(object1)[1]==dim(object2)[1]==dim(object3)[1]& dim(object1)[2]==dim(object2)[2]==dim(object3)[2] is true. How can I do that easily since the length of lst is not fixed? Thanks. Wayne (Yanwei) Zhang Ttatistical *esearch > CNA > > > E-MAIL CONFIDENTIALITY NOTICE: The contents of this e-mail message and any attachments are intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the intended recipient of thi...
2008 Sep 05
1
Plot by column
...7 The following the my code to do the above with the matrix called "r". How can I simply the code? plot(r[,1],type="n",ylim=c(0.4,1.2)) for (i in 1:7) {points(rep(i,8-i),r[,i][1:(8-i)],col=2) } for (i in 2:7) {points(rep(i,(i-1)),r[,i][(9-i):7],col=3)} Thanks Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America <mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Aug 12
1
VAR question
...B, C, D and E. A Vector Autoregression Model should work here. But first of all, I should select which series of B, C, D and E to be include in the VAR model, as well as the number of lags. I wonder If someone would give some advice on such a series selection procedure. Thanks so much. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2008 Aug 06
1
Matrix multiplication
Hi all, Is there an easy way to do cumulative matrix multipliation in R? What's the syntex? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: yzhang@munichreamerica.com<mailto:yzhang@munichreamerica.com> [[alternative HTML version deleted]]
2010 Mar 01
1
Method dispatch
..."abc", but when the package is loaded, the function "summary(x)" where x is of class "abc" seems to have called the default summary function for "ANY" class. Shouldn't it call the method I have defined? How could I get around with that? Thanks. Wayne (Yanwei) Zhang Statistical Research CNA NOTICE: This e-mail message, including any attachments and appended messages, is for the sole use of the intended recipients and may contain confidential and legally privileged information. If you are not the intended recipient, any review, dissemination, distr...
2010 May 31
3
How to delete the previously saved workspace restored
Dear all, I am a new user of R, here I have a question about remove the previous restored workspace. I saved the workspace last time, but R always automatically load the workspace when I open it. I try to remove the object and then close R without saving. But next time when I open R, it always load the previous workspace. I want to delete the .RData in the directory, but I have no clue
2009 Jun 15
0
books on Time serie
...ed. > > Kenny Larsen > -- > View this message in context: http://www.nabble.com/Assigning-Data-a-name-from-within-another-variable--tp24037279p24037279.html > Sent from the R help mailing list archive at Nabble.com. > > > > > > > > > > From: "Zhang,Yanwei" <Yanwei.Zhang@cna.com> > Date: 16 June 2009 1:58:15 AM > To: r-help@r-project.org > Subject: [R] Create R object > > > Dear R users, > > I have two simple questions here, and hope someone can help me on > this. Thanks in advance. > > 1. > I have a l...