similar to: Estimating parameters in a nonlinear model with observations

Displaying 20 results from an estimated 1000 matches similar to: "Estimating parameters in a nonlinear model with observations"

2011 Feb 02
2
Efficient way to determine if a data frame has missing observations
I have a data set covering a large number of cities with values for characteristics such as land area, population, and employment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have missing data. For example:
2011 Dec 09
0
Summary model with observations taken out and dummied back in - not working
I have a data set with 35 observations and 4 variables. I have removed 4 observations as they were skewing the data analysis but I want to dummy them back in, (not entirely sure on the reason, but have been told I should try). I have used this in order to do it, but I am not getting any statistical analysis with my dummy it's all NA. > dummy15=rep(0, times=n) > dummy15[15]=1 >
2011 Oct 01
1
Problem with logarithmic nonlinear model using nls() from the `stats' package
Example: > f <- function(x) { 1 + 2 * log(1 + 3 * x) + rnorm(1, sd = 0.5) } > y <- f(x <- c(1 : 10)); y [1] 4.503841 5.623073 6.336423 6.861151 7.276430 7.620131 7.913338 8.169004 [9] 8.395662 8.599227 > nls(x ~ a + b * log(1 + c * x), start = list(a = 1, b = 2, c = 3), trace = TRUE) 37.22954 : 1 2 3 Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an
2009 Aug 25
3
Covariates in NLS (Multiple nonlinear regression)
Dear R-users, I am trying to create a model using the NLS function, such that: Y = f(X) + q + e Where f is a nonlinear (Weibull: a*(1-exp(-b*X^c)) function of X and q is a covariate (continous variable) and e is an error term. I know that you can create multiple nonlinear regressions where x is polynomial for example, but is it possible to do this kind of thing when x is a function with unknown
2010 May 06
1
question about rolling regressions
Hi All, I am using R 2.11.0 on a Ubuntu machine. I have a time series data set and want to run rolling regressions with it. Any suggestions would be useful. Here are the details: (1) I convert relevant variables into time series objects and compute first differences: vad <- ts(data$ALLGVA/data$GDPDEF, start=1948, frequency=1) emp <- ts(data$ALLEMP, start=1948, frequency=1) vad.dif1 <-
2009 Jan 21
0
trouble switching to 'plm' from 'xtabond' and Stata
Hello, I am switching to R from Stata and I am having particular trouble with the transition from Stata's 'xtabond' and 'ivreg' commands to the "plm" package. I am trying to replicate some of the dynamic panel data work using the UK Employment data in Arellano and Bond (1991) and available as 'EmplUK' under the 'plm' package. I have been
2009 Nov 27
1
problem with "dynformula" from "plm" package [RE-POST]
Hello list, I'm following the paper (http://www.jstatsoft.org/v27/i02/paper) on how to use "plm" to run panel regressions, and am having trouble with what I believe should be something very basic. When I run the command (p.9 in the paper): R> dynformula(emp~wage+capital,log=list(capital=FALSE,TRUE),lag=list(emp=2,c(2,3)),diff=list(FALSE,capital=TRUE)) I see: emp ~ wage +
2010 Jan 25
3
Issue using tapply
Hello all, I am trying to use the tapply function to sum some values and change the column names of the resulting vector. I input Emp Et 1 10565 ACC 2 7515 ADM 3 625 AGF 4 6243 CNS 5 12721 EDU 6 3924 FIN 7 18140 HLH 8 3686 INF 9 15841 MFG 10 243 MIN 11 1864 MNG 12 4664 OSV 13 5496 PRF 14 4988 PUB 15 2166 REC 16 2153 REL 17 16082 RTL 18 3582 TRN 19 757 UTL 20
2009 Mar 30
0
pgmm (Blundell-Bond) sample needed)
Dear Ivo, dear list, (see: Message: 70 Date: Thu, 26 Mar 2009 21:39:19 +0000 From: ivowel at gmail.com Subject: [R] pgmm (Blundell-Bond) sample needed) I think I finally figured out how to replicate your supersimple GMM example with pgmm() so as to get the very same results as Stata. Having no other regressors in the formula initially drove me crazy. This was a case where simpler models are
2012 Mar 03
1
Problem running stepAIC within a function.
Hi I need to a function that automatically fits a regression to data, using the stepAIC. I've ran the code manually and it works fine. However, when I run the function on the same data, the following error occurs: Problem in regimp(fullsim = simt, fullsim1 = simt1,..: Length of (weights) (variable 4) is 4271 != length of others (4278) I got the function to output the length of the dataset
2005 Mar 08
1
To convert an adjacency list model into a nested set model
Dear R-help I am wondering if somebody wrote some code to convert an adjacency list model into a nested set model. In principal I want to do the same as John Celko mentioned it here with SQL: http://groups.google.co.uk/groups?hl=en&lr=lang_en&selm=8j0n05%24n31%241 %40nnrp1.deja.com Assume you have a tree structure like this Albert / \ /
2007 Aug 04
1
ActiveRecord gotcha with references?
I have this situation: class Employee < ActiveRecord::Base belongs_to :designation end class Designation < ActiveRecord::Base end I do the following at the irb console: Step 1: Find an employee >> emp = Employee.find 3 => #<Employee:0x35a7d34 @attributes={"designation_id"=>"3", "id"=>"3",
2003 Dec 18
1
NUMERIC DERIVATE
UseRs, I used the optim function valor.optim <- optim(c(1,1,1),logexp1,method ="BFGS",control=list(fnscale=-1),hessian=T); and I want to calculate the derivates, psi1<-valor.optim$par[1] psi2<-valor.optim$par[2] psi3<-valor.optim$par[3] a0=exp(psi1); a1=exp(psi2)/(20+exp(psi2)+exp(psi3)); a2=exp(psi3)/(20+exp(psi2)+exp(psi3))
2009 Nov 27
3
problem with "dynformula" from "plm" package
Hello list, I'm following the paper (http://www.jstatsoft.org/v27/i02/paper) on how to use "plm" to run panel regressions, and am having trouble with what I believe should be something very basic. When I run the command (p.9 in the paper): R> dynformula(emp~wage+capital,log=list(capital=FALSE,TRUE),lag=list(emp=2,c(2,3)),diff=list(FALSE,capital=TRUE)) I see: emp ~ wage +
2020 Jun 16
0
[External] numericDeriv alters result of eval in R 4.0.1
Thanks; definitely a bug. I've submitted it to the bug tracker at https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17831 Best, luke On Mon, 15 Jun 2020, Raimundo Neto wrote: > Dear R developers, > > I've run into a weird behavior of the numericDeriv function (from the stats > package) which I also posted on StackOverflow (question has same title as > this email,
2011 Sep 08
8
acts_as_solr problem ActsAsSolr::SearchResults:
hi, i am using acts_as_solr plugin when i tried with search by def search puts "#####################" # ids = params[:name] @id = params[:query] @emp = Employee.find_by_solr(@id) puts "------------------------------#{@emp}" respond_to do |format| format.html{render :action => ''search''} format.xml end
2013 Oct 10
0
Using calibrate for raking (survey package)
I'm studying the calibration function in the survey package in preparation for raking some survey data. Results from the rake function below agree with other sources. When I run calibrate, I get a warning message and the M and F weights seem to be reversed. Even allowing for that, the deviation between calibrated and raked weights is much more than I expected. I see that in the calibrate
2020 Jun 15
2
numericDeriv alters result of eval in R 4.0.1
Dear R developers, I've run into a weird behavior of the numericDeriv function (from the stats package) which I also posted on StackOverflow (question has same title as this email, except for the version of R). Running the code bellow we can see that the numericDeriv function gives an error as the derivative of x^a wrt a is x^a * log(x) and log is not defined for negative numbers. However,
2012 May 18
1
Help for numericDeriv function
Hi, I am stuck on something for a couple days, I am almost about to give up. This looks simple, but I can't figure out. I hope I can get some help here. I am trying to do some symbolic and numerical derivations. Let me explain the problem. Let's say, I have a matrix as follows: > load <- matrix(c(3,0,1,4,1,3),nrow=3,ncol=2,byrow=TRUE) > > load [,1] [,2] [1,] 3 0
2020 Jun 16
1
[External] numericDeriv alters result of eval in R 4.0.1
Dear all As far as I could trace, looking at the function C function numeric_deriv, this unwanted behavior comes from the inner most loop in, at the very end of the function, for(i = 0, start = 0; i < LENGTH(theta); i++) { for(j = 0; j < LENGTH(VECTOR_ELT(pars, i)); j++, start += LENGTH(ans)) { SEXP ans_del; double origPar, xx, delta; origPar = REAL(VECTOR_ELT(pars, i))[j];