similar to: weighted nonlinear fits: `nls' and `eval'

Displaying 20 results from an estimated 3000 matches similar to: "weighted nonlinear fits: `nls' and `eval'"

2008 Apr 30
0
weighted nonlinear fits: `nls' and `eval'
2 days ago I asked this on r-help, but no luck... since this is actually a programming question, I post it here again: my question concerns the use of `eval' in defining the model formula for `nls' when performing weighted fits. (I use version 2.6.2., but according to NEWS there were no changes to `nls' in 2.7.0, so the problem is still present). in this scenario their
2009 Oct 12
3
[LLVMdev] Alloca Requirements
Are there any implicit assumptions about where alloca instructions can appear. I've got a failing test where the only difference between a passing test and a failing test is one application of this code in instcombine: // Convert: malloc Ty, C - where C is a constant != 1 into: malloc [C x Ty], 1 Seems pretty harmless to me. Later on the instcombine code does this: // Scan to the end of
2020 Oct 05
1
Simultaneous Equation Model with Dichotomous Dependent Variables
Hello everyone! I am currently working with a time series panel data set measuring six dependent variables: 4 of which are binary and 2 of which are count data. I am interested in constructing a model to measure if the dependent variables influence one another. For example: DV1~ DV2 + IV1+IV2+ Controls and DV2~ DV1 + IV1+ IV2+ Controls (where IV stands for independent variable, not
2013 Oct 09
1
mixed model MANOVA? does it even exist?
Hi, Sorry to bother you again. I would like to estimate the effect of several categorical factors (two between subjects and one within subjects) on two continuous dependent variables that probably covary, with subjects as a random effect. *I want to control for the covariance between those two DVs when estimating the effects of the categorical predictors** on those two DVs*. The thing is, i
2012 Sep 19
0
Discrepancies in weighted nonlinear least squares
Dear all, I encounter some discrepancies when comparing the deviance of a weighted and unweigthed model with the AIC values. A general example (from 'nls'): DNase1 <- subset(DNase, Run == 1) fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1) This is the unweighted fit, in the code of 'nls' one can see that 'nls' generates a vector
2008 Jun 22
1
two newbie questions
# I've tried to make this easy to paste into R, though it's probably so simple you won't need to. # I have some data (there are many more variables, but this is a reasonable approximation of it) # here's a fabricated data frame that is similar in form to mine: my.df <- data.frame(replicate(10, round(rnorm(100, mean=3.5, sd=1)))) var.list <- c("dv1",
2005 Jul 07
1
multivariate regression using R
Does anyone know if there is a way to run multivariate linear regression in R? I tried using the lm function (e.g., lm(dv1, dv2~iv1+iv2+iv3), but got error messages. Is my syntax wrong, or do I need a particular package? Thanks, Jeff-- ________________________________________________________ Jeffrey J. Lusk, Ph.D. Postdoctoral Research Associate Department of Forestry &
2010 Oct 29
1
Repeated Measures MANOVA
Hello all, Is there an r function that exists that will perform repeated measures MANOVAs? For example, let's say I have 3 DVs, one between-subjects IV, and one within-subjects IV. Based on the documentation for the manova command, a function like that below is not appropriate because it cannot take Error arguments. manova(cbind(DV1,DV2,DV3) ~ BetweenSubjectsIV * WithinSubjectsIV +
2010 Oct 08
1
MANCOVA
Hi, I have been using R to do multiple analyses of variance with two covariates, but recently found that the results in SPSS were very different. I have check several books and web resources and I think that both methods are correct, but I am less familiar with R, so I was hoping someone could offer some suggestions. Oddly simple ANOVA is the same in SPSS and R. Including covariates improves the
2005 Oct 25
2
solving ODE's in matrix form with lsoda()
Hello there, Suppose you want to solve the following system of ODE's (a simple Lotka-Volterra predator prey model) dP/dt = beta*P*V - mu*P dV/dt = r*V - beta*P*V where P and V are the numbers of predators and prey. Now, this is easy to do, but suppose you have a system of equations like this, dP1/dt = beta1*P1*V1 - mu1*P1 dP2/dt = beta2*P2*V2 - mu2*P2 dV1/dt = r1*V1 - beta1*P1*V1
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
2006 Sep 07
0
Help understanding how nls parses the formula argument to estimate the model
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My nonlinear model is y<-nls(t~a*sin(w*2*pi/365*id+p)+b*id+int,data=t1,
2006 Sep 21
0
Help understanding how nls parses the formula argument to estimate the model
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My nonlinear model is y<-nls(t~a*sin(w*2*pi/365*id+p)+b*id+int,data=t1,
2006 Sep 15
1
Formula aruguments with NLS and model.frame()
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My nonlinear model is y<-nls(t~a*sin(w*2*pi/365*id+p)+b*id+int,data=t1,
2001 May 01
0
SSfpl self-start sometimes fails... workaround proposed
Hello, nls library provides 6 self-starting models, among them: SSfp, a four parameters logistic function. Its self-starting procedure involves several steps. One of these steps is: pars <- as.vector(coef(nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xydata, start = list(lscal = 0), algorithm = "plinear"))) which assumes an initial value of lscal equal to 0. If lscal
2007 Aug 23
0
weighted nls and confidence intervals
for unweighted fits using `nls' I compute confidence intervals for the fitted model function by using: #------------------- se.fit <- sqrt(apply(rr$m$gradient(), 1, function(x) sum(vcov(rr)*outer(x,x)))) luconf <- yfit + outer(se.fit, qnorm(c(probex, 1 - probex))) #------------------- where `rr' contains an `nls' object, `x' is the independent variable vector, `yfit'
2008 Jul 31
1
nls weights warning message
The following warning message occurs when running the nls on some data: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warning message: In is.na(wts) : is.na() applied to non-(list or vector) of type 'NULL' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and I would like to know what is causing it and how I can fix it. As an example, the following, from Venables and Ripley, which
2009 Dec 18
2
NLS-Weibull-ERROR
Hello I was trying to estimate the weibull model using nls after putting OLS values as the initial inputs to NLS. I tried multiple times but still i m getting the same error of Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates. The Program is as below > vel <- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14) > df <- data.frame(conc, vel) >
2010 Feb 17
2
Problems with xyplot
Hello I wonder whether someone can tell me what I am doing wrong. Here is the code (from Bayesian Computation with R - Chapter 2.3.R) that I am trying to run #################################### # Section 2.3 Using a Discrete Prior #################################### graphics.off() # Close all graphics rm(list=ls()) # Clear all variables library(LearnBayes)
2008 Jun 25
1
weighted inverse chi-square method for combining p-values
Hi, This is more of a general question than a pure R one, but I hope that is OK. I want to combine one-tailed independent p-values using the weighted version of fisher's inverse chi-square method. The unweighted version is pretty straightforward to implement. If x is a vector with p-values, then I guess that this will do for the unweighted version: statistic <- -2*sum(log(x)) comb.p <-