Displaying 20 results from an estimated 5000 matches similar to: "a question on plotting nonlinear regression"
2023 Aug 20
1
Determining Starting Values for Model Parameters in Nonlinear Regression
The cautions people have given about starting values are worth heeding. That nlxb() does well in many cases is useful,
but not foolproof. And John Fox has shown that the problem can be tackled very simply too.
Best, JN
On 2023-08-19 18:42, Paul Bernal wrote:
> Thank you so much Dr. Nash, I truly appreciate your kind and valuable contribution.
>
> Cheers,
> Paul
>
> El El
2023 Aug 19
1
Determining Starting Values for Model Parameters in Nonlinear Regression
Thank you so much Dr. Nash, I truly appreciate your kind and valuable
contribution.
Cheers,
Paul
El El s?b, 19 de ago. de 2023 a la(s) 3:35 p. m., J C Nash <
profjcnash at gmail.com> escribi?:
> Why bother. nlsr can find a solution from very crude start.
>
> Mixture <- c(17, 14, 5, 1, 11, 2, 16, 7, 19, 23, 20, 6, 13, 21, 3, 18, 15,
> 26, 8, 22)
> x1 <- c(69.98, 72.5,
2004 Apr 21
2
Question on CAR appendix on NLS
The PDF file on the web, which is an appendix on nonlinear regression
associated with the CAR book, is very nice.
When I ran through the code presented there, I found something
odd. The code does a certain model in 3 ways: Vanilla NLS (using
numerical differentation), Analytical derivatives (where the user
supplies the derivatives) and analytical derivatives (using automatic
differentiation). The
2023 Aug 19
1
Determining Starting Values for Model Parameters in Nonlinear Regression
Dear friends,
Hope you are all doing well and having a great weekend. I have data that
was collected on specific gravity and spectrophotometer analysis for 26
mixtures of NG (nitroglycerine), TA (triacetin), and 2 NDPA (2 -
nitrodiphenylamine).
In the dataset, x1 = %NG, x2 = %TA, and x3 = %2 NDPA.
The response variable is the specific gravity, and the rest of the
variables are the predictors.
2018 Apr 04
1
parfm unable to fit models when hazard rate is small
Hello, I would like to use the parfm package: https://cran.r-project.org/web/packages/parfm/parfm.pdfhttps://cran.r-project.org/web/packages/parfm/parfm.pdf in my work. This package fits parametric frailty models to survival data. To ensure I was using it properly, I started by running some small simulations to generate some survival data (without any random effects), and analyse the data using
2013 May 15
1
Problem with convergence in optim
Hello to all,
I have been using an optim with the following call:
optim(param_ini,fun_errores2,Precio_mercado=Precio,anos_pagosE2=anos_pagos,control=list(maxit=10000,reltol=1e-16))
depending on the intial values I'm getting the same solution but once I get
the convergence message=10 (no convergence) and for the others I get
convergence message = 0
Solution1:
$par
beta1
2006 Mar 27
1
Missing Argument in optim()
Hello everybody,
i already searched the archieves, but i still don't know what is wrong
in my implementation, mybe anybody coud give me some advice
ll1<-function(rho,theta,beta1,beta2,beta3,beta4,t,Szenariosw5,Testfaellew5,X1,X2)
{
n<-length(t)
t<-cumsum(t)
tn<-t[length(t)]
Szenn<-Szenariosw5[length(Szenariosw5)]
2010 Mar 26
1
Problems if optimization
What's up fellows...
I am a begginer in R and i am trying to find the parameters of one
likelihood function, but when i otimize it, always appers a error or
advertisement and the solve does not occur.
The problem seems like that:
"lMix<-function(pars,y){
beta1<-pars[1]
beta2<-pars[2]
beta3<-pars[3]
beta4<-pars[4]
beta5<-pars[5]
alfa1<-pars[6]
2012 Oct 03
1
Errors when saving output from WinBUGS to R
Dear all
I used R2WinBUGS package's bugs() function to generate MCMC results. Then I
tried to save the simulation draws in R, using read.bugs() function. Here is
a simple test:
######################
library(coda)
library(R2WinBUGS)
#fake some data to test
beta0=1
beta1=1.5
beta2=-1
beta3=2
N=200
x1=rnorm(N, mean=0,sd=1)
x2=rnorm(N, mean=0,sd=1)
x3=rnorm(N, mean=0,sd=1)
lambda2= exp(beta0+
2012 Dec 04
1
Winbugs from R
Hi,
I am trying to covert a Winbugs code into R code. Here is the winbugs code
model{# model’s likelihoodfor (i in 1:n){time[i] ~ dnorm( mu[i], tau ) # stochastic componenent# link and linear predictormu[i] <- beta0 + beta1 * cases[i] + beta2 * distance[i]}# prior distributionstau ~ dgamma( 0.01, 0.01 )beta0 ~ dnorm( 0.0, 1.0E-4)beta1 ~ dnorm( 0.0, 1.0E-4)beta2 ~ dnorm( 0.0, 1.0E-4)#
2009 Aug 19
1
ridge regression
Dear all,
I considered an ordinary ridge regression problem. I followed three
different ways:
1. estimate beta without any standardization
2. estimate standardized beta (standardizing X and y) and then again convert
back
3. estimate beta using lm.ridge() function
X<-matrix(c(1,2,9,3,2,4,7,2,3,5,9,1),4,3)
y<-t(as.matrix(cbind(2,3,4,5)))
n<-nrow(X)
p<-ncol(X)
#Without
2009 Aug 19
1
Ridge regression [Repost]
Dear all,
For an ordinary ridge regression problem, I followed three different
approaches:
1. estimate beta without any standardization
2. estimate standardized beta (standardizing X and y) and then again convert
back
3. estimate beta using lm.ridge() function
X<-matrix(c(1,2,9,3,2,4,7,2,3,5,9,1),4,3)
y<-as.matrix(c(2,3,4,5))
n<-nrow(X)
p<-ncol(X)
#Without standardization
2012 Sep 16
1
How to plot two lines, and only one line with errorbar by qqplots of R
Here is my code, which plots three lines with errorbar. How could I add an
extra line without errorbar to the plot? Thank you very much.
beta.data <- data.frame (
method = rep(c("Wrong", "Correct", "Full Bayes"), each = T_obs),
mean.beta = c(mean.beta1, mean.beta2, mean.beta3),
t = rep(points, 3),
std.beta = c(std.beta1, std.beta2, std.beta3)
)
limits =
2007 May 14
1
Hierarchical models in R
Is there a way to do hierarchical (bayesian) logistic regression in R, the
way we do it in BUGS? For example in BUGS we can have this model:
model
{for(i in 1:N) {
y[i] ~ dbin(p[i],n[i])
logit(p[i]) <- beta0+beta1*x1[i]+beta2*x2[i]+beta3*x3[i]
}
sd ~ dunif(0,10)
tau <- pow(sd, -2)
beta0 ~ dnorm(0,0.1)
beta1 ~ dnorm(0,tau)
beta2 ~ dnorm(0,tau)
beta3 ~
2005 Nov 09
5
How to find statistics like that.
Hi there,
Suppose mu is constant, and error is normally distributed with mean 0 and
fixed variance s. I need to find a statistics that:
Y_i = mu + beta1* I1_i beta2*I2_i + beta3*I1_i*I2_i + +error, where I_i is
1 Y_i is from group A, and 0 if Y_i is from group B.
It is large when beta1=beta2=0
It is small when beta1 and/or beta2 is not equal to 0
How can I find it by R? Thank you very much
2009 Mar 05
1
problems with nls?
I need to make nonlinear regression with the posterior script, but how is the
problem? I have error in library (nls), package 'nls' has been merged into
'stats'.
I need help?
What other forms I have to make nonlinear regression? and how I find to
calculate statistics y residuals, scatterplot.
thanks
SCRIPT
ros<-read.table("Dataset.csv",header=T,sep=",")
2017 Aug 10
2
EOF within quoted string
Hi,
Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading it using
data <- read.csv("20_newsgroups.csv",header=TRUE)
throws this.
Warning message:
In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
EOF within quoted string
So, for example, the first line in the file is this. This column contains only such text. Is there a way read it ?
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2017 Aug 10
0
EOF within quoted string
You might want to try some of the suggestions mentioned in this post:
https://stackoverflow.com/q/17414776/2140956
Jean
On Thu, Aug 10, 2017 at 7:59 AM, <Mohan.Radhakrishnan at cognizant.com> wrote:
> Hi,
>
> Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading
> it using
>
> data <- read.csv("20_newsgroups.csv",header=TRUE)
>
>
2017 Aug 11
1
EOF within quoted string
Yes. I tried that already. Not straightforward.
data <- read.csv("20_newsgroups.csv",fill=TRUE,as.is=T,header=F, quote="", sep=",", encoding="UTF-8")
This line does read it haphazardly. The emails in the column are split into multiple columns and there are several columns with just ?NA?. Totally 202 columns.
And then I removed columns with NA?s and