similar to: constrOptim

Displaying 20 results from an estimated 100 matches similar to: "constrOptim"

2011 Aug 26
2
How to generate a random variate that is correlated with a given right-censored random variate?
Hi, I have a right-censored (positive) random variable (e.g. failure times subject to right censoring) that is observed for N subjects: Y_i, I = 1, 2, ..., N. Note that Y_i = min(T_i, C_i), where T_i is the true failure time and C_i is the censored time. Let us assume that C_i is independent of T_i. Now, I would like to generate another random variable U_i, I = 1, 2, ..., N, which is
2008 Oct 24
3
Computational problems in R
Dear all, I would be grateful if anyone can help me with the following: My aim is to compute explicitely the sum S=A+B where A=sum(exp(c_i/d)), i=1,...,n; B, c_i, and d are real numbers with -Inf<B,c_i<+Inf; and d>0. The problem is that when c_i/d >710 (for some i) R is setting exp(c_i/d) to be equal to +Inf and hence the whole summation S. So in simple cases where for example c_i=8
2006 Aug 10
1
How to fit bivaraite longitudinal mixed model ?
Hi Is there any way to fit a bivaraite longitudinal mixed model using R. I have a data set with col names resp1 (Y_ij1), resp2 (Y_ij2), timepts (t_ij), unit(i) j=1,2,..,m and i=1,2,..n. I want to fit the following two models Model 1 Y_ij1, Y_ij2 | U_i = u_i ~ N(alpha + u_i + beta1*t_ij, Sigma) U_i ~ iid N(0, sigu^2) Sigma = bivariate AR structure alpha and beta are vectors of order 2.
2011 Apr 15
1
How to generate a correlation matrix with restrictions on its eigenvalues
Dear All, I would like to generate m positive real numbers c_i, I=1,...,m, such that (1) c_1 + c_2 + ... + c_m=m, (1) after being ordered into c_1 >= c_2 >= .... >=c_m>0, we have that c_m is of the same order of m^(-1/8), when m is sufficiently large. Thanks, -Chee [[alternative HTML version deleted]]
2005 Jun 04
1
can R do Fixed-effects (within) regression (panel data)?
i want to ask 2 questions. 1) can R do Random-effects GLS regression which i can get from Stata? the following result is frome Stata.can I get the alike result from R? xtreg lwage educ black hisp exper expersq married union, re Random-effects GLS regression Number of obs = 4360 Group variable (i) : nr Number of groups = 545 R-sq:
2002 Aug 12
0
help with pseudo-random numbers
Dear People, I have a vexing problem related to pseudo-random number generation, and would appreciate any help and advice. This problem is not directly related to R, and the only reason I am posting it to this list is that my implementation is using R. Let me describe my problem by giving an example, that is close to what I am trying to do. Suppose we are given a stream of pseudo-random numbers,
2004 Apr 18
2
lm with data=(means,sds,ns)
Hi Folks, I am dealing with data which have been presented as at each x_i, mean m_i of the y-values at x_i, sd s_i of the y-values at x_i number n_i of the y-values at x_i and I want to linearly regress y on x. There does not seem to be an option to 'lm' which can deal with such data directly, though the regression problem could be algebraically
2011 Nov 22
1
Generate Simulation
Hallo everybody, I'm new in r and I"ll appreciate some help! I have a matrix of nrow=30 and ncoll=54,and I would like to generate 50 simulations with tha same size of the matrix!!!That is to say that I want to generate 50 matrices -for my 50 simulations - with the same dimensions! I took my 1st matrix according to the formula that I want to implement: D<-mean_m + U_i*mat_DELTA
2015 Jan 03
4
Potential cross-platform package building issue
I am using 32-bit R 3.1.2 on Windows 7. I recently conducted an `R CMD check --as-cran` on a recently-developed package and received only the 'New submission' note. Research on StackOverflow and on R-devel suggested this could be ignored. I also used devtools::build_win() and received no notes or warnings, other than the one mentioned previously. Lastly, I conducted an `R CMD check` with
2011 Dec 20
0
rpart weight parameter and random forest based on rpart
Hi all, I am very new to R (only two days of studies). I know a little bit of statistical learning and looking for an implementation of CART and random forest and therefore I am now studying R. I tested with rpart and randomForest package, they are quite good. However, I need a classification tree and for each training data, there is different loss. (i.e. the loss function is not purely 0-1,
2006 Nov 21
3
Fitting mixed-effects models with lme with fixed error term variances
Dear R users, I am writing to you because I have a few question on how to fix the error term variances in lme in the hope that you could help me. To my knowledge, the closest possibility is to fix the var-cov structure, but not the whole var-cov matrix. I found an old thread (a few years ago) about this, and it seems that the only alternative is to write the likelihood down and use optim or a
2012 Feb 10
0
coxme with frailty
A couple of clarifications for you. 1. I write mixed effects Cox models as exp(X beta + Z b), beta = fixed effects coefficients and b = random effects coefficients. I'm using notation that is common in linear mixed effects models (on purpose). About 2/3 of the papers use exp(X beta)* c, i.e., pull the random effects out of the exponent. Does it make a difference? Not much: b will be
2010 Jun 09
1
equivalent of stata command in R
Dear all, I need to use R for one estimation, and i have readily available stata command, but i need also the R version of the same command. the estimation in stata is as following: 1. Compute mean values of relevant variables . sum inno lnE lnM Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------
2017 Aug 10
1
"Help On optim"
Hello, I have some parameters from Mclust function. The parameters are in the form *parametersDf * * mu_1 mu_2 var_mc1 var_mc2 c1 c2 * *2 1.357283 2.962736 0.466154 0.1320129 0.5258975 0.4741025 * *21 8.357283 9.962736 0.466154 0.1320129 0.5258975 0.4741025 * Each row in the above data frame
2001 Oct 09
1
PROC MIXED user trying to use (n)lme...
Dear R-users Coming from a proc mixed (SAS) background I am trying to get into the use of (n)lme. In this connection, I have some (presumably stupid) questions which I am sure someone out there can answer: 1) With proc mixed it is easy to get a hold on the estimated variance parameters as they can be put out into a SAS data set. How do I do the same with lme-objects? For example, I can see the
2015 Jan 03
0
Potential cross-platform package building issue
On 3 January 2015 at 13:49, Steven Ranney wrote: | I am using 32-bit R 3.1.2 on Windows 7. | | I recently conducted an `R CMD check --as-cran` on a recently-developed | package and received only the 'New submission' note. Research on | StackOverflow and on R-devel suggested this could be ignored. I also used | devtools::build_win() and received no notes or warnings, other than the one |
2010 Jun 09
1
equivalent of stata command in R‏
From: saint-filth@hotmail.com To: saint-filth@hotmail.com Subject: RE: Date: Wed, 9 Jun 2010 09:53:20 +0000 OK! sorry thats my fault, here the translations of the stata commands 1st step is to get the mean values of the variables, well that doesnt need explanation i guess, 2nd step is to estimate the model on panel data estimation method which is:
2004 Apr 02
0
Hessian in constrOptim
Dear R-users, In the function constrOptim there is an option to get an approximation to the hessian of the surrogate function R at MLE by declaring hessian=TRUE in the calls to the function optim. I would like to ask if it is advisable to get an approximate hessian for the funcrion f as follows: f''(theta)=R''(theta|theta_k)-B''(theta) where
2010 Jun 09
1
equivalent of stata command in R‏‏
Thanx for your response, yeah, i know i didnst specified the indexes when i wrote the 2nd mail, in fact in the 1st mail i wrote already that i dont have problem with the estimation of the model... thats the reason why i didnt write in fact since the issue is not to estimate the model but to get the marginal effect, anyway, i figured out that predict(), doesnt work for panel data... and well, my
2006 Oct 17
1
About compositional data analysis
The compositional data xi=(x_i1,x_i2,...,x_in), for each fixed i , xij>0, and sum(xij)=1; I want to compare the mean( u_i) of several groups i.e. H0: u_1=u_2=...=u_N or H0: u_11=u_21=...=u_N1 Are there any ANOVA tpye tools to do this work in R? Thanks, WEN S Q [[alternative HTML version deleted]]