similar to: a nlm() question

Displaying 20 results from an estimated 500 matches similar to: "a nlm() question"

2008 Nov 03
1
a nlm question
Dear R listers, I posted this problem several days ago but it seems nobody answered. I use nlm to optimize a given function ,but it always generates the following warnings " Error in nlm(foo, theta.start) : non-finite value supplied by 'nlm' " I don't know why ,can anybody give me some hints ?? thanks in advance. regards .
2008 Nov 24
6
optimization problem
Dear list, hi ! I am a R beginner and I have a function to optimize . alpha = argmin{ f(x,alpha) } I want alpha to be in [0,1]. Is there any function that can work? I use nlm() but i can't fix the domain of alpha. thanks in advance _______________________ Jiang Peng, Ph.D. Candidate Department of Mathematics & Antai college of Economics and Management Shanghai Jiao
2008 Jun 30
0
Fwd: cannot install the package RMySQL
Hi, I first report the installing error to the r-sig-mac mailing list but it seems nobody ever encounter this annoying problem and I got no replies. so I am trying to forward it to this list, hope it never bothers. Anyone had the same problem, or what does the warning message mean ? Thank you in advance ! Begin forwarded message: > From: Peng Jiang <jp021@sjtu.edu.cn> > Date:
2008 Sep 16
5
How to find the index
Dear R experts, i have a vector z , i have to do something after z is sorted. how can i find the original index, i.e., before sorting, of a certain element in the sorted vector . thanks in advance regards ----------------------------------------------- Peng Jiang ?? ,Ph.D. Candidate Antai College of Economics & Management ???????? Department of Mathematics ??? Shanghai Jiaotong
2008 Jun 23
3
Simulating Gaussian Mixture Models
Hi, Is there any package that I can use to simulate the Gaussian Mixture Model , which is a mixture modeling method that is widely used in statistical learning theory. I know there is a mclust, however, I think it is a little bit different from my problem. Thanks very much.. regards. -------------------------- Peng Jiang ?? Ph.D. Candidate Antai College of Economics &
2008 Jul 03
2
what can we do when R gives no response
Hi, dear R experts , I am new. I met this problem when I am trying to learn how to use the nlminb() function. I tried the example which the document provides ( as the following code ) and R gives no response . I don't know whether it is running or not and it takes a very long time but still output nothing so I just close the session window. my question is is there any method
2012 Oct 23
1
scatterplot with wrong line offset
Hi All, I'm trying to do a Scatterplot (package: car), and add a line (just for reference). There is my code: #------------------------------------Code--------------------------------------------------- library("car") library("calibrate") G_T<-c("car","bike","boat") ave<-c(80,10,45) perf<-c(100,80,75) df2<-data.frame(G_T,ave,perf)
2010 Oct 06
1
dlm package: how to specify state space model?
Dear r-users! I have another question regarding the dlm package and I would be very happy if someone could give me a hint! I am using the dlm package to get estimates for an endogenous rate of capacity utilization over time. The general form of a state space model is (1) b_t = G * b_t-1 + w_t w_t ~ N(0,W) (2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V) (Hamilton 1984: 372) The
2011 Apr 22
1
How to generate normal mixture random variables with given covariance function
Dear All, Suppose Z_i, i=1,...,m are marginally identically distributed as a two normal mixture p0*N(0,1) + (1-p0) *N( miu_i, 1) where miu_i are identically distributed according to a mixture and I have generated Z_i one by one . Now suppose these m random variables are jointly m-dimensional normal with correlation matrix M= (m_ij). How to proceed next or how to start correctly ? Question:
2010 Sep 28
0
Time invariant coefficients in a time varying coefficients model using dlm package
Dear R-users, I am trying to estimate a state space model of the form (1) b_t = G * b_t-1 + w_t w_t ~ N(0,W) (2) y_t= A' * x_t + H' * b_t + v_t v_t ~ N(0,V) (Hamilton 1984: 372) In particular my estimation in state space form looks like (3) a3_t = 1 * a3_t-1 + w_t w_t ~ N(0,W) (4) g_t = (a1, a2) * (1, P_t)' + u_t * a3_t + v_t v_t ~ N(0,V) where g_t is the
2013 Feb 27
0
A program running for a too long time
Dear all, The attached code is supposed to minimize a numerical integration subject to a non linear constraint. The code runs for 2 days& more without giving an output. Also, when i change the value of "m<-100" to "m<-1" it gives an output in areasonable period but with a message " maximum number of iterations in romberg has been reached". I need to : 1-
2007 Jun 14
0
random effects in logistic regression (lmer)-- identification question
Hello R users! I've been experimenting with lmer to estimate a mixed model with a dichotomous dependent variable. The goal is to fit a hierarchical model in which we compare the effect of individual and city-level variables. I've run up against a conceptual problem that I expect one of you can clear up for me. The question is about random effects in the context of a model fit with a
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
Dear all, I tried running the following syntax but it keeps running for about 4 hours and then i got the following errors: Error in if (is.na(f0$objective)) { : argument is of length zero In addition: Warning message: In is.na(f0$objective) : is.na() applied to non-(list or vector) of type 'NULL' Here is the syntax itself: library('nloptr') library('pracma') #
2010 Jul 13
1
Batch file export
Dear all, I have a code that generates data vectors within R. For example assume: z <- rlnorm(1000, meanlog = 0, sdlog = 1) Every time a vector has been generated I would like to export it into a csv file. So my idea is something as follows: for (i in 1:100) { z <- rlnorm(1000, meanlog = 0, sdlog = 1) write.csv(z, "c:/z_i.csv") Where "z_i.csv" is a filename that is
2007 Mar 09
1
help with zicounts
Dear UseRs: I have simulated data from a zero-inflated Poisson model, and would like to use a package like zicounts to test my code of fitting the model. My question is: can I use zicounts directly with the following simulated data? Create a sample of n=1000 observations from a ZIP model with no intercept and a single covariate x_{i} which is N(0,1). The logit part is logit(p_{i})=x_{i}*beta
2010 Nov 03
1
Orthogonalization with different inner products
Suppose one wanted to consider random variables X_1,...X_n and from each subtract off the piece which is correlated with the previous variables in the list. i.e. make new variables Z_i so that Z_1=X_1 and Z_i=X_i-cov(X_i,Z_1)Z_1/var(Z_1)-...- cov(X_i,Z__{i-1})Z__{i-1}/var(Z_{i-1}) I have code to do this but I keep getting a "non-conformable array" error in the line with the covariance.
2009 Feb 15
0
Kalman Filter - dlm package
Dear all, I am currently trying to use the "dlm" package for Kalman filtering. My model is very simple: Y_t = F'_t Theta_t + v_t Theta_t = G_t Theta_t-1 + w_t v_t ~ N(0,V_t) = N(0,V) w_t ~ N(0,W_t) = N(0,W) Y_ t is a univariate time series (1x1) F_t is a vector of factor returns (Kx1) Theta_t is the state vector (Kx1) G_t is the identity matrix My first
2003 Dec 02
2
model of fish over exploitation
Dear all, I have a serious problem to solve my model. I study over exploitation of fish in the bay of biscay (france). I know only the level of catch and the fishing effort (see data below) by year. My model is composed by the following equations: * the growth function Gt(St) = r*St*(1-St/sbar) with Gt the growth of each period t r intrinsec growth of the stock sbar carriyng capacity of the
2008 May 07
1
dlm with constant terms
Hi, I am trying to figure how to use dlm with constant terms (possibly time-dependent) added to both equations y_t = c_t + F_t\theta_t + v_t \theta_t = d_t + G_t\theta_{t-1} + w_t, in the way that S-PLUS Finmetrics does? Is there any straightforward way to transform the above to the default setup? Thanks, Tsvetan -------------------------------------------------------- NOTICE: If received in
2008 Jul 08
1
about EM algorithm
Hi, dear R experts . is there any package contain an universal EM procedure, that is , for arbitrary d.f. , not just the one in mclust . thanks in advance best regards ----------------------------------------------- Peng Jiang ?? ,Ph.D. Candidate Antai College of Economics & Management ???????? Department of Mathematics ??? Shanghai Jiaotong University (Minhang Campus) 800 Dongchuan Road