Re: [R] Calling stargazer() with do.call() in R 4.2.0

2022-05-28 Thread Arne Henningsen
Dear Andrew Thanks a lot for investigating the problem and for suggesting a solution and a workaround! I have asked the maintainer of the 'stargazer' package to fix the problem. Until then, we can use the workaround that you suggested. Best regards, Arne On Sat, 28 May 2022 at 23:

Re: [R] Interpreting coefficient in selection and outcome Heckman models in sampleSelection

2021-01-01 Thread Arne Henningsen
n the sampleSelection package; I would assist you with this. Best regards, Arne On Mon, 28 Dec 2020 at 15:22, Marinella Cirillo via R-help wrote: > > Dear Arne, > > I have just read the exchange of messages with Mark Bulling.I was wondering > if you have discovered/developed a funct

Re: [R] [External] Re: unable to access index for repository...

2020-10-10 Thread Arne Henningsen
On Fri, 9 Oct 2020 at 12:28, Martin Maechler wrote: > > >>>>> Steven Yen > >>>>> on Fri, 9 Oct 2020 05:39:48 +0800 writes: > > > Oh Hi Arne, You may recall we visited with this before. I > > do not believe the problem is algorithm

Re: [R] [External] Re: unable to access index for repository...

2020-10-08 Thread Arne Henningsen
Hi Steven Which optimisation algorithms in maxLik work better under R-3.0.3 than under the current version of R? /Arne On Thu, 8 Oct 2020 at 21:05, Steven Yen wrote: > > Hmm. You raised an interesting point. Actually I am not having problems with > aod per se—-it is just a supportin

Re: [R] Tobit Regression with unbalanced Panel Data

2017-01-04 Thread Arne Henningsen
Dear Vanessa Please provide a minimal *reproducible* example that illustrates your problem, e.g. using a data set that is included in an R package. Best regards, Arne On 4 January 2017 at 10:28, Vanessa Romero wrote: > Hello, > > I am doing Tobit Regression in R, because my

Re: [R] Hickman models with two binary dependent variables in R

2016-08-29 Thread Arne Henningsen
n package. Sorry! Anyway, I guess that it is not too complicated to derive the likelihood function and implement the estimation yourself, e.g., using the maxLik package. If you do this, I would be happy to help you to implement this feature in the sampleSelection package. Best wishes, Arne

Re: [R] Hickman models with two binary dependent variables in R

2016-08-27 Thread Arne Henningsen
tive contract is concluded only upon > an express mutual agreement on all its aspects. > - the sender of this e-mail informs that he/she is not authorized to enter > into any contracts on behalf of the company except for cases in which he/she > is expressly authorized to do s

Re: [R] HELP - Hausman Test + systemfit

2016-01-06 Thread Arne Henningsen
[1] http://www.inside-r.org/packages/cran/systemfit/docs/hausman.systemfit Best regards, Arne On 6 January 2016 at 20:02, David Winsemius wrote: > >> On Jan 6, 2016, at 9:44 AM, Jeff Newmiller wrote: >> >> To post appropriately, use less apologizing and more reading o

Re: [R] Estimating Endogenous Selection Model

2015-09-18 Thread Arne Henningsen
st and the other for firms that do not invest. Best regards, Arne On 18 September 2015 at 07:43, Johannes Muck wrote: > Dear all, > > I want to estimate a model in which individuals self-select into two > different actions (e.g. invest or not invest). Moreover, the factors that >

Re: [R] simultaneous equation model with endogenous interaction terms

2015-08-12 Thread Arne Henningsen
help me with this? To estimate the above model specification, the following should work: eq1 <- Y1 ~ I(Y2*X1) + X2 eq2 <- Y2 ~ I(Y1*X1) + X2 inst <- ~ X2 + Z1 + Z2 system <- list( eq1 = eq1, eq2 = eq2 ) reg2SLS <- systemfit( system, "2SLS", inst = inst, data = mydata ) Be

Re: [R] Warning message with maxLik()

2015-07-17 Thread Arne Henningsen
. [1] http://r.789695.n4.nabble.com/NaN-produced-from-log-with-positive-input-td4709463.html Best regards, Arne 2015-07-18 2:46 GMT+02:00 Maram SAlem : > Dear All, > I'm trying to get the MLe for a certain distribution using maxLik () > function. I wrote the log-likelihood funct

Re: [R] NaN produced from log() with positive input

2015-07-11 Thread Arne Henningsen
Dear Maram On 8 July 2015 at 17:52, Maram Salem wrote: > Dear Arne, > > On a second thought, as per your mail "the warning messages occur each time, > when maxLik() tries to calculate > the logLik value for theta[1] <= 0, theta[1] + theta[2] <= 0, theta[3] <= 0 >

Re: [R] NaN produced from log() with positive input

2015-07-07 Thread Arne Henningsen
hat your estimated parameter vector 'param' consists of log( theta[1] ), log( theta[2] ), and log( theta[3] ). After the estimation, you can obtain the estimated values of the thetas by exp( param[1] ), exp( param[2] ), and exp( param[3] ) . Best regards, Arne 2015-07-06 2:29 GMT+02

Re: [R] PEA and APE Tobit

2015-02-26 Thread Arne Henningsen
project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Please follow the posting guide and provide a self-contained reproducible example. Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name

Re: [R] MLE

2014-12-21 Thread Arne Henningsen
Lik http://dx.doi.org/10.1007/s00180-010-0217-1 https://absalon.itslearning.com/data/ku/103018/publications/maxLik.pdf > I would appreciate any help. http://www.R-project.org/posting-guide.html http://maxlik.org/ https://r-forge.r-project.org/projects/maxlik/ Best regards, Arne -- Arne He

Re: [R] maximum likelihood estimation

2014-10-10 Thread Arne Henningsen
uide.html > and provide commented, minimal, self-contained, reproducible code. Your example is not reproducible: > pr(N(2)=n)= integral( ((2-x)^n)*(exp(ax-2))) - integral (((5-ax)^n)) Error: unexpected '=' in "pr(N(2)=" Please format your email in a way t

Re: [R] maximum likelihood estimation

2014-10-09 Thread Arne Henningsen
uide.html > and provide commented, minimal, self-contained, reproducible code. Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] comparing two "half-normal production" stochastic frontier functions

2014-10-03 Thread Arne Henningsen
) # likelihood ratio test lrtest( mp, md ) If you have further questions regarding the frontier package, you may also use the "help" forum at frontier's R-Forge site: https://r-forge.r-project.org/projects/frontier/ ...and please do not

Re: [R] Library(mice) too slow for my dataset

2014-08-05 Thread Arne H . Schulz
Dear Teresa, using such services will only speed up the imputations significantly if you can split up/parallelize your code. And maybe you can use more cores on your local machine by using packages like doSNOW, foreach and/or plyr. There are a lot of examples on the web. Kind regards Arne

[R] [R-pkgs] sampleSelection 1.0 released

2014-06-28 Thread Arne Henningsen
Arne [1] http://cran.r-project.org/package=sampleSelection [2] http://www.jstatsoft.org/v27/i07/ [3] http://r-forge.r-project.org/projects/sampleselection/ -- Arne Henningsen http://www.arne-henningsen.name ___ R-packages mailing list r-packa...@r

Re: [R] Tobit model with panel data

2014-05-01 Thread Arne Henningsen
p://www.jstatsoft.org/v27/i02/) 3rd step: use censReg() to estimate the model (see http://cran.r-project.org/web/packages/censReg/vignettes/censReg.pdf) Please do read the posting guide http://www.R-project.org/posting-guide.html Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.

Re: [R] Problem with new(er) R version's matrix package

2014-04-25 Thread Arne Henningsen
t;> not my data. > > You have not told us what version of the Matrix package you were using. > As such I would suggest that you review the Changelog which is a link > for the CRAN page for pkg:Matrix and go back 4 years or so since R > major versions change about once a year. >

Re: [R] Testing correlation of equation in a SUR model fitted by systemfit

2014-04-16 Thread Arne Henningsen
forum at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ ... and please do not forget to cite systemfit in your publications (see output of the R command 'citation("systemfit")'). Best regards, Arne -- Arne Henningsen http://www.arne-henn

Re: [R] Discrete-continuous equation system in R

2014-01-02 Thread Arne Henningsen
unction (and preferably also the derivatives/gradients with respect to the parameters), and maximize this log-likelihood function, e.g. with the R package "maxLik" (http://maxlik.org/). Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name _

Re: [R] MaxLik estimation issues

2013-10-20 Thread Arne Henningsen
Dear Filipe On 14 October 2013 17:42, Filipe Ribeiro wrote: > Dear Arne, > > First of all, thank you very much for your reply. Secondly, please accept my > apologies for only give you an answer now, but I was moving from one country > to another and only today I was able to get ba

Re: [R] MaxLik estimation issues

2013-09-25 Thread Arne Henningsen
forums at maxLik's R-Forge site: https://r-forge.r-project.org/projects/maxlik/ ...and please do not forget to cite the maxLik package in your publications: http://cran.r-project.org/web/packages/maxLik/citation.html Best wishes, Arne -- Arne Henningsen http://www.arne-henningsen.name _

Re: [R] Weighted SUR/NSUR

2013-08-20 Thread Arne Henningsen
feature, I wonder if I should start a crowd-funding campaign... Best regards, Arne On 16 August 2013 18:23, Ariel wrote: > Arne Henningsen-3 wrote >>> Is it possible >>> to run SUR with weights using systemfit? I mean weighted seemingly >> unrelated >>> regre

Re: [R] 2sls and systemfit

2013-07-30 Thread Arne Henningsen
ethod in this case. Please do not forget to cite the systemfit package in your publications. Thanks! Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

[R] [R-pkgs] Version 1.0 of the R package "frontier" released

2013-07-22 Thread Arne Henningsen
uot; can still be used for maintaining backward-compatibility. http://cran.r-project.org/package=frontier https://r-forge.r-project.org/projects/frontier/ Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name ___ R-packages mailing list r-pac

Re: [R] 2SLS / TSLS / SEM non-linear

2013-07-13 Thread Arne Henningsen
Y_i > = a + b * X_i + u. It seems to me that this estimation is very simple: myModel <- lm( Y ~ X ) but perhaps I did not completely understand your model specification. Best, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@

Re: [R] Testing for weak exogeneity in a SUR ECM

2013-07-13 Thread Arne Henningsen
Dear Kathrinchen It seems to me that your question is about statistics rather than about R and systemfit. If you find out how the statistical test should be conducted theoretically, I can probably advise you how to implement the test in R (systemfit). Best wishes, Arne On 11 July 2013 13:21

Re: [R] Weighted SUR/NSUR

2013-06-30 Thread Arne Henningsen
that are specific to systemfit via the help forum at systemfit's R-Forge site: https://r-forge.r-project.org/projects/systemfit/ Best wishes, Arne [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] 2SLS / TSLS / SEM non-linear

2013-06-30 Thread Arne Henningsen
s, and u is the error term. I do not understand your model specification. In your first equation IV1 and IV2 look like parameters. Is your model perhaps: Y = a + b x X + u X = c + d x IV1 + e x IV2 + v with a, b, c, d, and e being parameters and u and v being disturbance terms? Best wishes, Arn

Re: [R] maxLik: different estimations from different packages

2013-05-10 Thread Arne Henningsen
find out the reason for the NaNs in the analytical gradients yourself, please provide a reproducible example so that we could help you with this. Please note that you could also ask questions regarding the maxLik package via a forum at maxLik's R-Forge site: https://r-forge.r-project.org/proje

Re: [R] Stochastic Frontier: Finding the optimal scale/scale efficiency by "frontier" package

2013-04-25 Thread Arne Henningsen
further questions regarding the "frontier" package, I suggest that you use the "help" forum at frontier's R-Forge site [2]. [2] https://r-forge.r-project.org/projects/frontier/ ... and please do not forget to cite the R packages that you use in your analysis in your publicati

Re: [R] FRONTIER

2013-02-15 Thread Arne Henningsen
at [1]. If you have any further questions regarding the "frontier" package, please use a forum at the package's R-Forge site [3]. [1] http://www.uq.edu.au/economics/cepa/frontier.php [2] http://frontier.r-forge.r-project.org/ [3] http://r-forge.r-project.org/projects/frontier/ Best

Re: [R] Error message "cs_lu(A) failed: near-singular A (or out of memory)"

2012-12-25 Thread Arne Henningsen
//www.micEcon.org/ [4] http://r-forge.r-project.org/projects/micecon/ [5] http://r-forge.r-project.org/projects/frontier/ Best (holiday) wishes from Copenhagen, Arne On 9 December 2012 23:31, Rui Neiva wrote: > Hi there everyone, > > I have the following model (this is naturally a simpl

Re: [R] Coefficient of determination for non-linear equations system (nlsystemfit)

2012-11-24 Thread Arne Henningsen
e for the individual > objects, e.g. R-squared As the "eq" component is a "list" (see documentation), you must use double brackets: nl.system$eq[[i]] > eq.1 <- nl.system$eq[1] > > eq.1$r2 You can directly use: nl.system$eq[[

Re: [R] extracting and restricting coefficients

2012-10-16 Thread Arne Henningsen
ft.org/v23/i04/paper and http://www-systemfit.org/ Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

Re: [R] System/SUR equations and panel

2012-10-08 Thread Arne Henningsen
variables for individuals and/or time periods or estimate the model with "within transformed" data. Best wishes, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] Constraining parameters using tag() in SUR model - ZELIG

2012-09-13 Thread Arne Henningsen
l porgrams already written - > but > I am open to switching everything I have directly to systemfit if I can get > teh parameters constrained OK. /Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing lis

Re: [R] Constraining parameters using tag() in SUR model - ZELIG

2012-09-12 Thread Arne Henningsen
). Please do not forget to cite systemfit in your publications--no matter whether you directly use it or through zelig(). Thanks! [1] http://www.jstatsoft.org/v23/i04/paper /Arne On 12 September 2012 20:05, Samantha Azzarello wrote: > Hello all, > I am following some standard code from Zelig m

Re: [R] SYSTEMFIT HELP

2012-08-14 Thread Arne Henningsen
a forum or "tracker" on systemfit's R-Forge site: http://r-forge.r-project.org/projects/systemfit/ Best wishes from Copenhagen, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.

[R] Question regarding behaviour of package {plspm}

2012-07-31 Thread Arne Erpenbach
luck.) I assume the maintainers are still somewhere around, even if my mails remained unresponded. The package did not turn up in the orphaned package list. So, anyone who could help me on this? Regards, arne __ R-help@r-project.org mailing list

Re: [R] Tobit Fixed Effects

2012-04-13 Thread Arne Henningsen
nGHQ=15, iterlim=1, > data = d3) > > The error is: > > Error in solve.default(OM) : >   system is computationally singular: reciprocal condition number = > 4.41531e-17 Did you solve this problem in the mean time? If not: I could take a look at it if you send me a repro

Re: [R] Systemfit with structural equations and cross equation parameter interaction

2012-04-07 Thread Arne Henningsen
on estimating systems of non-linear equations with the systemfit package, please take a look at the FAQ section of systemfit's website: http://www.systemfit.org/ Best wishes, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-proj

Re: [R] How to do 2SLS in R

2012-03-21 Thread Arne Henningsen
mfit can also estimate multiple-equation models. I hope that the documentation of systemfit as well as the JSS paper are sufficiently clear. If you still have questions regarding systemfit, please use a forum or "tracker" on systemfit's R-Forge site (see http://systemfit.or

Re: [R] Demographic Variables in AIDS (Demand System)

2012-03-06 Thread Arne Henningsen
les in this system? You can use argument "shifterNames" for this. BTW: You can also ask questions, report problems, etc. about the micEconAids package via a forum or "tracker" at the R-Forge site [1] of the micEcon project [2]. [1] https://r-forge.r-project.org/projects/miceco

Re: [R] Tobit Fixed Effects

2012-03-02 Thread Arne Henningsen
Dear Felipe On 29 September 2011 14:10, Arne Henningsen wrote: > Hi Felipe > > On 25 September 2011 00:16, Felipe Nunes wrote: >> Hi Arne, >> my problem persists. I am still using censReg [version - 0.5-7] to run a >> random effects model in my data (>50,00

Re: [R] Prediction from censReg?

2011-12-13 Thread Arne Henningsen
a predict() method for "censReg" objects. Sorry! However, if you have (or anybody else has) time and skills to do this, please do not hesitate to become a project member at R-Forge and implement this method. Thanks! Best wishes, Arne -- Arne Henningsen http://www.arne-henningsen.name

Re: [R] Unable to reproduce Stata Heckman sample selection estimates

2011-11-25 Thread Arne Henningsen
method? Which commands did use use? Can you send us a reproducible example? Have you read the paper about using the sampleSelection package [2]? [1] http://www.r-project.org/posting-guide.html [2] http://www.jstatsoft.org/v27/i07 Best wishes from copenhagen, Arne -- Arne Henningsen http://www.arn

[R] [R-pkgs] mvProbit -- Multivariate Probit Models

2011-11-15 Thread Arne Henningsen
dependent variables. Feedback is very welcome! /Arne -- Arne Henningsen http://www.arne-henningsen.name ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages _

Re: [R] Estimating model parameters for system of equations

2011-11-15 Thread Arne Henningsen
timate your equations jointly, I am afraid that you either have to switch to another software or have to implement the estimation yourself. You could, e.g., minimize the determinant of the residual covariance matrix with optim(), nlm(), nlminb(), or another optimizer or you could maximize th

Re: [R] sum of functions

2011-10-06 Thread Arne Henningsen
r all observations? loglik <- function(b) sapply( 1:N, loglik.i, b = b ) Please note that logLik( b ) returns a *vector* of the likelihood contributions of each observation. maxLik() takes the sum of the elements of this vector automatically. If logLik( b ) returns a vector of the likelihood contri

Re: [R] Tobit Fixed Effects

2011-09-29 Thread Arne Henningsen
Hi Felipe On 25 September 2011 00:16, Felipe Nunes wrote: > Hi Arne, > my problem persists. I am still using censReg [version - 0.5-7] to run a > random effects model in my data (>50,000 cases), but I always get the > message. > tob7 <- censReg(transfers.cap ~ pt.pt + psdb

Re: [R] Tobit Fixed Effects

2011-09-24 Thread Arne Henningsen
On 25 September 2011 00:16, Felipe Nunes wrote: > Hi Arne, > my problem persists. I am still using censReg [version - 0.5-7] to run a > random effects model in my data (>50,000 cases), but I always get the > message. > tob7 <- censReg(transfers.cap ~ pt.pt + psdb.pt + pt.op

Re: [R] function censReg in panel data setting

2011-09-24 Thread Arne Henningsen
ers.cap ~ pt.pt + psdb.pt + pt.opp + pt.coa + psdb.coa > + pib.cap + transfers.cap.lag + pib.cap + ifdm + log(populat) + > mayor.vot.per + log(bol.fam.per+0.01) + factor(uf.name) + factor(year) - 1, > left=0, right=Inf, method="BHHH", nGHQ=8, iterlim=1, data = pdata2) Did you upgra

Re: [R] Tobit Fixed Effects

2011-09-18 Thread Arne Henningsen
Hi Felipe On 18 September 2011 09:09, Felipe Nunes wrote: > Thanks, Arne! > But I'm having another problem now. When I transform my data into a > pdata.frame form and try to run a tobit model with random effects I get an > error. Below I provide the head of my data, the code I u

Re: [R] Tobit Fixed Effects

2011-09-17 Thread Arne Henningsen
t exceeded. > Log-likelihood: -67680.41 on 42 Df You can use argument "iterlim" to increase the maximum number of iterations, see documentation of maxNR(). /Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mai

Re: [R] Tobit Fixed Effects

2011-09-15 Thread Arne Henningsen
I highly recommend to use the BHHH method, particularly for the random effects panel data estimation. /Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Tobit Fixed Effects

2011-09-15 Thread Arne Henningsen
m", and estimate a random-effects model? What do you exactly mean with "never converge"? Did you try to increase the maximum number of iterations (argument "iterlim")? Did you try to use other optimization methods, e.g. BHHH (argument "method")? What is th

Re: [R] function censReg in panel data setting

2011-09-14 Thread Arne Henningsen
On 14 September 2011 00:36, Arne Henningsen wrote: > Hi Igors > > On 13 September 2011 13:27, Igors wrote: >> Any success in finding possible solutions for my problem? > > Somewhat. The calculation of the log-likelihood values is numerically > much more robust/stable

Re: [R] function censReg in panel data setting

2011-09-13 Thread Arne Henningsen
or waiting many days or even a few weeks. /Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-gu

Re: [R] function censReg in panel data setting

2011-09-11 Thread Arne Henningsen
possibility of obtaining > estimates? Using your small data set, the maximization of the (log) likelihood function in censReg() did not converge within 100 iterations. Therefore, I increased the maximum number of iterations from 100 to 200 -- and then the maximization conve

Re: [R] function censReg in panel data setting

2011-09-09 Thread Arne Henningsen
8.00 <2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 BHHH maximisation, 131 iterations Return code 2: successive function values within tolerance limit Log-likelihood: -5538.124 on 4 Df /Arne -- Arne Henningsen http://www.arne-henningsen.name __

Re: [R] function censReg in panel data setting

2011-09-07 Thread Arne Henningsen
ause of this error without a reproducible example. Is is possible that you send a reproducible example to me? Could it be that there are NAs in the data or something in the panel data specification is not as censReg() expects it? /Arne -- Arne Henningsen http://www.arne-henningsen.name _

Re: [R] function censReg in panel data setting

2011-09-06 Thread Arne Henningsen
d R-Forge [3] probably within one or two days. [1] https://r-forge.r-project.org/scm/?group_id=256 [2] http://cran.r-project.org/package=censReg [3] https://r-forge.r-project.org/R/?group_id=256 /Arne -- Arne Henningsen http://www.arne-henningsen.name __

Re: [R] function censReg in panel data setting

2011-09-05 Thread Arne Henningsen
variance of the individual effects ("mu"), and variance of the general error term ("nu"). http://cran.r-project.org/web/packages/censReg/vignettes/censReg.pdf Best wishes from Copenhagen, Arne -- Arne Henningsen http://www.arne-henningsen.name _

Re: [R] Problem running maxLik on R

2011-05-24 Thread Arne Henningsen
#x27;s wrong. Any advice will be much > appreciated. Please do read the posting guide, the documentation of maxLik, the examples included in this documentation, and the following paper: http://dx.doi.org/10.1007/s00180-010-0217-1 Best wishes, Arne -- Arne He

Re: [R] help with the maxBHHH routine

2011-05-03 Thread Arne Henningsen
it says about argument "grad": "[...] If the BHHH method is used, ‘grad’ must return a matrix, where rows correspond to the gradient vectors of individual observations and the columns to the individual parameters.[...]" More information of the maxLik package is available at: http://d

Re: [R] look for the package of latent class stochastic frontier

2011-04-12 Thread Arne Henningsen
s stochastic frontier models out of the box. Then "frontier" and "Benchmarking" packages provide tools for (ordinary) stochastic frontier analysis. Best wishes from Copenhagen, Arne -- Arne Henningsen http://www.arne-henningsen.name ___

Re: [R] maximum likelihood accuracy - comparison with Stata

2011-03-30 Thread Arne Henningsen
duces approximate > solutions, whereas in this simple case, an 'exact' solution > is possible (and found by R). > > 6. > In case you weren't aware of it: the stats4 package has an > mle() function. ... and there is the "maxLik" package. http://cran.r-project.org/pa

Re: [R] recommended reading for manual maximum likelihood of a system of equations

2011-03-24 Thread Arne Henningsen
;systemfit" package. You could join the developer team at R-Forge. Best wishes from Copenhagen, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] new distribution

2011-03-22 Thread Arne Henningsen
gradient functions) and use, e.g., the maxLik() package for maximising the likelihood. The source code of the "frontier" package is hosted on R-Forge. I am sorry that I and the "frontier" package cannot be more helpful right now. Best wishes from Copenhagen, Arne -- Arne Henni

[R] Sample or Probability Weights in LM4, NLME (and PLM) package

2011-03-10 Thread Arne Jonas Warnke
longitudinal data with sample weights? Kind regards, Arne [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] R beginner - Error in as.vector(x, mode)

2011-03-10 Thread Arne Henningsen
ng the data (e.g. read.dta(), read.table(), or read.csv()) -- of course -- depends on the file format. /Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] R beginner - Error in as.vector(x, mode)

2011-03-10 Thread Arne Henningsen
auto) > > Error in as.vector(x, mode) : >  cannot coerce type 'builtin' to vector of type 'any' I guess that the starting values cause this error. The documentation says: "startvals: a list of starting values for the coefficients." Note, it should be a *lis

[R] Longitudinal Weights in PLM package

2011-02-10 Thread Arne
data? Thank you in advance! Best regards, Arne -- View this message in context: http://r.789695.n4.nabble.com/Longitudinal-Weights-in-PLM-package-tp3298823p3298823.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

Re: [R] VECM - GARCH using maxLik()

2011-02-09 Thread Arne Henningsen
omega + alpha*res[i-1]^2 + beta*sig2[i-1] > ll[i] <- -1/2*log(2*pi*sig2[i]) - 1/2*res[i]^2/sig2[i] > } I have no idea for sig2 but you could move ll out of the loop: > ll[2:99] <- -1/2*log(2*pi*sig2[2:99]) - 1/2*res[2:99]^2/sig2[2:99] /A

Re: [R] VECM - GARCH using maxLik()

2011-02-09 Thread Arne Henningsen
37345 -1.847598 -1.793146 [50] -1.492001 -1.289086 -1.210335 -1.824306 -1.580044 -1.350120 -3.977663 [57] -2.213723 -2.022477 -1.704629 -1.599071 -1.789774 -1.421933 -2.004710 [64] -1.645671 -1.544476 -1.371070 -2.947443 -1.845836 -1.840481 -1.664951 [71] -1.564801 -1.327754 -1.463221 -1.230692 -1.099

[R] Insert variable in RMySQL-Statement

2011-02-09 Thread Arne H. Schulz
select * from db Where id = ";) } My problem is to split the select-statement and insert the current id. How can I handle this problem? Best regards, Arne __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] fast optimization routines in R

2011-02-07 Thread Arne Henningsen
ptimizers in > MATLAB. maxLik() includes several different optimisation routines. Did you try all of them? /Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Hausman Test

2011-01-16 Thread Arne Henningsen
Hi Achim! On 16 January 2011 16:37, Achim Zeileis wrote: > Arne: Unless I'm missing something, hausman.systemfit() essentially does the > right thing and computes the right statistic and p-value (see my other mail > to Holger). Maybe some preliminary check on the input objects

Re: [R] Hausman Test

2011-01-16 Thread Arne Henningsen
ir variance covariance matrix of a _2SLS_ estimation and $b_3$ and $V_3$ are the estimated coefficients and their variance covariance matrix of a _3SLS_ estimation. = Please don't hesitate to write a new version of hausman.systemfi

Re: [R] Tobit model on unbalanced panel

2010-11-24 Thread Arne Henningsen
Hi Terry On 24 November 2010 15:34, Terry Therneau wrote: > For tobit regression, also see the last example of help(survreg) in the > survival package. How does the survreg() function of the "survival" package account for the panel structure of the data? Best wishes, Arne --

Re: [R] Tobit model on unbalanced panel

2010-11-24 Thread Arne Henningsen
horoughly tested yet. If you experience any problems, please report them via the "tracker" of the "sampleSelection" project on R-Forge [1]. Thanks! [1] https://r-forge.r-project.org/tracker/?group_id=256 Best regards, Arne -- Arne Henningsen http://www.arne-henningsen.name

Re: [R] Hausman test for endogeneity

2010-10-10 Thread Arne Henningsen
e exogenous, both estimates should be consistent but the SUR estimates should be more efficient. Best wishes, Arne -- Arne Henningsen http://www.arne-henningsen.name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

Re: [R] Can I monitor the iterative/convergence process while using Optim or MaxLik?

2010-09-14 Thread Arne Henningsen
a value larger than 0. /Arne -- Arne Henningsen http://www.arne-henningsen.name [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] How to use lm() output for systemfit() 'Seemingly unrelated regression'

2010-09-03 Thread Arne Henningsen
ins even when I try: >> fo1 <- r98[,2] ~ f98[,1] + f98[,2] + ... + f98[,43] >> fo2 <- r98[,1] ~ f98[,1] + f98[,2] + ... + f98[,43] > instead of using lm() > Could someone give me a hand? I am quite new to R, so possibly the solutions > is simple:) Yes, the formula(

Re: [R] maxNR in maxLik package never stops

2010-08-30 Thread Arne Henningsen
g "print.level=4" as argument of maxLik() or maxNR(). You could send us also an example which allows us to replicate your problem. Best wishes, Arne On 29 August 2010 01:06, "Martin Boďa" wrote: > > > > > > > Greetings, > > > >  I

[R] t.test in for loop

2010-07-22 Thread Arne Schulz
-vector (running t.test(data1) by hand works). How can I remove the quotes before performing the test? Sincerely, Arne Schulz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

Re: [R] Generate groups with random size but given total sample size

2010-07-15 Thread Arne Schulz
Hi, thanks a lot! That did it! Regards, Arne Schulz > -Ursprüngliche Nachricht- > Von: Greg Snow [mailto:greg.s...@imail.org] > Gesendet: Dienstag, 13. Juli 2010 18:17 > An: Arne Schulz; r-help@r-project.org > Betreff: RE: [R] Generate groups with random size but given to

[R] Generate groups with random size but given total sample size

2010-07-13 Thread Arne Schulz
3 Another way could be generating one sample at a time and sum the cases. But this would end up in trail & error to fit the 10.000 cases. Maybe it would break rules of probability, too. I'm convinced that there should be another (and even better) way to handle this problem in R...

Re: [R] Robust SE & Heteroskedasticity-consistent estimation

2010-05-17 Thread Arne Henningsen
On 17 May 2010 22:55, RATIARISON Eric wrote: > It's ok Arne, i've build the MS windows binary. > > And the result is ok (sandwich function runs)with this next modifications in > my user specified functions > But with the following functions (individual one): > >

Re: [R] Robust SE & Heteroskedasticity-consistent estimation

2010-05-17 Thread Arne Henningsen
ods can be applied only if maxLik() was called with argument "grad" equal to a gradient function or (if no gradient function is specified) argument "logLik" equal to a log-likelihood function that return the gradients or log-likelihood values, respectively, for *each observation* (

Re: [R] Robust SE & Heteroskedasticity-consistent estimation

2010-05-10 Thread Arne Henningsen
least, you need an estfun() method which > extracts the gradient contributions per observation. Then you need a bread() > function, typically based on the observed Hessian. Then you can compute the > basic sandwich() estimators. Is it possible to implement the estfun() method and the brea

[R] [R-pkgs] micEcon split into micEconSNQP, micEconCES, and micEcon

2010-03-27 Thread Arne Henningsen
e the CES function using much more estimation methods (optimizers) now, e.g. the Levenberg-Marquardt or the Differential Evolution algorithm. Furthermore a "vignette" (supplementary documentation) "Estimating the CES Function in R: Package micEconCES" (written by Geraldine Hen

Re: [R] maxNR - Error in p(a, b) : element 1 is empty; the part of the args list of '*' being evaluated was: (b, t)

2010-03-23 Thread Arne Henningsen
1 Condition number of the (active) hessian: 1 -Iteration 1 - -Iteration 2 - -Iteration 3 - -Iteration 4 - -Iteration 5 - -Iteration 6 - -- gradient close to zero. May be a solution 6 iterations estimate: -0.6288598 Function value: -

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Arne Henningsen
es not mean that your error term also follows a beta distribution. And it the distribution of the error term which is crucial for specifying the likelihood function. /Arne > On Wed, Mar 17, 2010 at 9:07 AM, Corrado wrote: >> Dear Gabor, >> >> 1) The constraints are active,

Re: [R] Question regarding to maxNR

2010-03-11 Thread Arne Henningsen
:-) Algebraically, "log(prod(z))" is equal to "sum(log(z))" but these two expressions might return different numbers on digital computers: R> ll<-function(mu) { sum(log(dcauchy(x,mu,s))) } R> ll(2) [1] -754.4928 R> loglik(2) [1] -Inf R> maxNR(ll,start=median(x))

  1   2   >