similar to: Question on CAR appendix on NLS

Displaying 20 results from an estimated 2000 matches similar to: "Question on CAR appendix on NLS"

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
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
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
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)#
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+
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
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.
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
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,
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 ~
2011 Jul 24
1
a question on plotting nonlinear regression
Hi to all the people, I'm having a trouble when trying to plot a quadratic function. I have the code: regression<-nls(Survival~beta1+beta2*PI+beta3*PI^2, data=cubs, start=list(beta1 = 1, beta2 = 1, beta3 = 1)) plot(Survival~PI,data=cubs, ylab="Survival", xlab="PI") lines(cubs$PI, fitted(regression)) but the plotted line is not the quadratic one, rather it appears a
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=",")
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
2012 May 27
7
Customized R Regression Output?
Hello R-Experts, I am facing the problem that I have to estimate several parameters for a lot of different dependent variables. One single regression looks something like this: y = beta0 + beta1 * x1 + beta2 * x2 + beta3 * x1 * x2 + beta4 * x4 + beta5 * lag(x4,-1) where y is the dependent variable and xi are the independent ones. Important to me are the different estimates of betai and their
2013 Apr 03
3
Generating a bivariate joint t distribution in R
Hi, I conduct a panel data estimation and obtain estimators for two of the coefficients beta1 and beta2. R tells me the mean and covariance of the distribution of (beta1, beta2). Now I would like to find the distribution of the quotient beta1/beta2, and one way to do it is to simulate via the joint distribution (beta1, beta2), where both beta1 and beta2 follow t distribution. How could we
2008 Mar 19
1
betabinomial model
Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if i fix it to the anova type estimate obtained from icc( in package aod) then it says system is exactly singular. And when i try to fit my loglikelihood by