similar to: bug in logLik.nls (PR#2295)

Displaying 20 results from an estimated 10000 matches similar to: "bug in logLik.nls (PR#2295)"

2006 Feb 07
1
sampling and nls formula
Hello, I am trying to bootstrap a function that extracts the log-likelihood value and the nls coefficients from an nls object. I want to sample my dataset (pdd) with replacement and for each sampled dataset, I want to run nls and output the nls coefficients and the log-likelihood value. Code: x<-c(1,2,3,4,5,6,7,8,9,10) y<-c(10,11,12,15,19,23,26,28,28,30) pdd<-data.frame(x,y)
2012 Jan 20
1
nobs() and logLik()
Dear all, I am studying a bit the various support functions that exist for extracting information from fitted model objects. From the help files it is not completely clear to me whether the number returned by nobs() should be the same as the "nobs" attribute of the object returned by logLik(). If so, then there is a slight inconsistency in the methods for 'nls' objects with
2003 Jan 15
2
Bug or Feature? LogLik.nls and non-central F distribution.
I have a dataset that I am running non-linear regression on via the following code: Hill <- function(E0,Em,C50,g,C){ # # Hill is the hill interaction function. # # E0 Represents the minimum interaction Effect # # Em Represents the Maximum Interaction Effect # # C50 represents the concentration at which 50% of the effect occurs. # # gamma represents the cooperativity of the
2013 Jan 31
1
LogLik of nls
Hello there, Can anyone point me to the code for logLik of an nls object? I found the code for logLik of an lm but could not find exactly what function is used for calculating the logLik of nls function? I am using the nls to fit the following model to data - Model 1: y ~ Ae^(-mx) + Be^(-nx) +c and want to understand what is the likelihood function used by nls. Presumably it is using -
2002 Aug 27
5
probit etc. for dose-response modeling
Hello all I have done some fitting of pnorm functions to dose-response data, so I could calculate EC50 values (dose where the response is 0.5). I used the nlm function for this, so I did not get any information about the confidence intervals of the fitted parameters. What would be a good way to do such a probit fit, or is there a package which I could use? Best regards Johannes Ranke
2003 Jun 25
3
logLik.lm()
Hello, I'm trying to use AIC to choose between 2 models with positive, continuous response variables and different error distributions (specifically a Gamma GLM with log link and a normal linear model for log(y)). I understand that in some cases it may not be possible (or necessary) to discriminate between these two distributions. However, for the normal linear model I noticed a discrepancy
2005 Apr 19
1
behaviour of logLik and lme
Dear all, when performing a meta analysis I have two results obtained with logLik and lme, which I do not quite understand. The results are based on these data: study or var 1 0.10436 0.299111 2 -0.03046 0.121392 3 0.76547 0.319547 4 -0.19845 0.025400 5 -0.10536 0.025041 6 -0.11653 0.040469 7 0.09531 0.026399 8 0.26236 0.017918 9 -0.26136 0.020901 10 0.45742 0.035877 11
2006 Feb 22
2
does multinomial logistic model from multinom (nnet) has logLik?
I want to get the logLik to calculate McFadden.R2 ,ML.R2 and Cragg.Uhler.R2, but the value from multinom does not have logLik.So my quetion is : is logLik meaningful to multinomial logistic model from multinom?If it does, how can I get it? Thank you! ps: I konw VGAM has function to get the multinomial logistic model with logLik, but I prefer use the function from "official" R
2007 Aug 15
1
AIC and logLik for logistic regression in R and S-PLUS
Dear R users, I am using 'R' version 2.2.1 and 'S-PLUS' version 6.0; and I loaded the MASS library in 'S-PLUS'. I am running a logistic regression using glm: --------------------------------------------------------------------------- > mydata.glm<-glm(COMU~MeanPycUpT+MeanPycUpS, family=binomial, data=mydata)
2010 Feb 16
1
nls.lm & AIC
Hi there, I'm a PhD student investigating growth patterns in fish. I've been using the minpack.lm package to fit extended von Bertalanffy growth models that include explanatory covariates (temperature and density). I found the nls.lm comand a powerful tool to fit models with a lot of parameters. However, in order to select the best model over the possible candidates (without covariates,
2004 Jul 16
1
Does AIC() applied to a nls() object use the correct number of estimated parameters?
I'm wondering whether AIC scores extracted from nls() objects using AIC() are based on the correct number of estimated parameters. Using the example under nls() documentation: > data( DNase ) > DNase1 <- DNase[ DNase$Run == 1, ] > ## using a selfStart model > fm1DNase1 <- nls( density ~ SSlogis( log(conc), Asym, xmid, scal ), DNase1 ) Using AIC() function: >
2005 Dec 14
3
Fitting binomial lmer-model, high deviance and low logLik
Hello I have a problem when fitting a mixed generalised linear model with the lmer-function in the Matrix package, version 0.98-7. I have a respons variable (sfox) that is 1 or 0, whether a roe deer fawn is killed or not by red fox. This is expected to be related to e.g. the density of red fox (roefoxratio) or other variables. In addition, we account for family effects by adding the mother
2001 Jan 09
3
log(0) problem in max likelihood estimation
This practical problem in maximum likelihood estimation must be encountered quite a bit. What do you do when a data point has a probability that comes out in numerical evaluation to zero? In calculating the log likelihood you then have a log(0) problem. Here is a simple example (probit) which illustrates the problem: x<-c(1,2,3,4,100) ntrials<-100 yes<-round(ntrials*pnorm((x-3)/1))
2011 Mar 28
1
Degrees of freedom for lm in logLik and AIC
I have a question about the computation of the degrees of freedom in a linear model: x <- runif(20); y <- runif(20) f <- lm(y ~ x) logLik(f) 'log Lik.' -1.968056 (df=3) The 3 is coming from f$rank + 1. Shouldn't it be f$rank? This affects AIC(f). Thanks Frank ----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context:
2008 Feb 23
1
print.logLik
I have a vector of logLik values that I'd like to return and it would be nice if the the print method didn't run them together. Could I make a plea for using sep = " ", rather than sep = "" in print.logLik? url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu Department of Economics vox: 217-333-4558
2008 Nov 18
2
error in function: nls (urgent)
Hi,all: I am running a nonlinear regression and there is a problem. There is a data frame: data p s x t 1 875.0 12392.5 11600 0.06967213 2 615.0 12332.5 12000 0.06967213 3 595.0 12332.5 12000 0.06967213 4 592.5 12337.0 12000 0.06967213 5 650.0 12430.0 12000 0.06967213 6 715.0 12477.5 12000 0.06967213 . . . . str(data): 'data.frame': 234 obs. of 4 variables:
2006 Jan 19
1
nls profiling with algorithm="port" may violate bounds (PR#8508)
[posted to R-devel, no discussion: resubmitting it as a bug, just so it gets logged appropriately] Sorry to report further difficulties with nls and profiling and constraints ... the problem this time (which I didn't check for in my last round of testing) is that the nls profiler doesn't seem to respect constraints that have been set when using the port algorithm. See test code
2008 Mar 20
1
logLik calculations
Does the ?logLik? function applied to a ?glm? and ?glm.nb? (from MASS package) calculate the complete log-likelihoods, or does it drop the constant terms of the equation? (It?s not clear from the associated help pages, and I?ve found no reference from searching the R help mailing list) Thank you, Kelly Young
2006 Aug 09
1
NLS and IV
Hello All, I'm looking to test a variable in a logit model (glm(..., binomial(link="logit"))) for exogeneity (endogeneity). At this point I am planning to try implementing Jeffery Grogger's "A Simple Test for Exogeneity in Probit, Logit, and Poisson Regression Models", Economic Letters, 1990. To do this, I need to be able to do an instrumental variables NLS
2009 Feb 25
3
indexing model names for AICc table
hi folks, I'm trying to build a table that contains information about a series of General Linear Models in order to calculate Akaike weights and other measures to compare all models in the series. i have an issue with indexing models and extracting the information (loglikehood, AIC's, etc.) that I need to compile them into the table. Below is some sample code that illustrates my