similar to: Lattice: How to draw curves from given formulae

Displaying 20 results from an estimated 2000 matches similar to: "Lattice: How to draw curves from given formulae"

2011 Oct 12
2
Nonlinear regression aborting due to error
Colleagues, I am fitting an Emax model using nls. The code is: START <- list(EMAX=INITEMAX, EFFECT=INITEFFECT, C50=INITC50) CONTROL <- list(maxiter=1000, warnOnly=T) #FORMULA <- as.formula(YVAR ~ EMAX - EFFECT * XVAR^GAMMA / (XVAR^GAMMA + C50^GAMMA)) ## alternate version of formula FORMULA <- as.formula(YVAR ~ EMAX - EFFECT / (1 + (C50/XVAR)^GAMMA)) FIT <-
2011 May 27
1
Put names in the elements of lapply result
Dear list, I am running some linear regressions through lapply, >lapply(c('EMAX','EC50','KOUT','GAMMA'),function(x)confint(lm(get(x)~RR0,dataset2))) I got results like [[1]] 2.5 % 97.5 % (Intercept) 0.6595789212 0.8821691261 RR0 -0.0001801771 0.0001489083 [[2]] 2.5 % 97.5 % (Intercept) -63.83694930
2008 Nov 26
1
Request for Assistance in R with NonMem
Hi I am having some problems running a covariate analysis with my colleage using R with the NonMem program we are using for a graduate school project. R and NonMem run fine without adding in the covariates, but the program is giving us a problem when the covariate analysis is added. We think the problem is with the R code to run the covariate data analysis. We have the control stream, R code
2004 Dec 01
1
tuning SVM's
Hi I am doing this sort of thing: POLY: > > obj = best.tune(svm, similarity ~., data = training, kernel = "polynomial") > summary(obj) Call: best.tune(svm, similarity ~ ., data = training, kernel = "polynomial") Parameters: SVM-Type: eps-regression SVM-Kernel: polynomial cost: 1 degree: 3 gamma: 0.04545455 coef.0: 0
2010 Jul 12
1
What is the degrees of freedom in an nlme model
Dear all, I want to do a F test, which involves calculation of the degrees of freedom for the residuals. Now say, I have a nlme object "mod.nlme". I have two questions 1.How do I extract the degrees of freedom? 2.How is this degrees of freedom calculated in an nlme model? Thanks. Jun Shen Some sample code and data =================================================================
2014 Feb 18
1
Problems with admin interface / beta4
Hi folks, I've been running icecast-2.3.99.3 in production since it was released. It solved a problem of the icecast process terminating from time to time and appears quite stable. In the process of moving to new servers I noticed beta 4 and compiled it for FreeBSD 10 on a dell poweredge. I have been unable to get the administrative interface working properly. You can view
2008 Aug 21
5
psychometric functions
Hi, I want to fit some psychophysical data with cumulative gaussians. There is quite a convenient toolbox for matlab called 'psignifit' (formerly known as 'psychofit'). It allows the lower bound of the sigmoid to vary slightly from zero, aswell as the upper bound to vary from one. with these two free parameters, the fitted function is less sensitive to noisy data and outliers.
2009 Apr 26
1
Stochastic Gradient Ascent for logistic regression
Hi. guys, I am trying to write my own Stochastic Gradient Ascent for logistic regression in R. But it seems that I am having convergence problem. Am I doing anything wrong, or just the data is off? Here is my code in R - lbw <- read.table("http://www.biostat.jhsph.edu/~ririzarr/Teaching/754/lbw.dat" , header=TRUE) attach(lbw) lbw[1:2,] low age lwt race smoke ptl ht ui ftv
2005 Apr 11
1
glm family=binomial logistic sigmoid curve problem
I'm trying to plot an extrapolated logistic sigmoid curve using glm(..., family=binomial) as follows, but neither the fitted() points or the predict()ed curve are plotting correctly: > year <- c(2003+(6/12), 2004+(2/12), 2004+(10/12), 2005+(4/12)) > percent <- c(0.31, 0.43, 0.47, 0.50) > plot(year, percent, xlim=c(2003, 2007), ylim=c(0, 1)) > lm <- lm(percent ~ year)
2011 May 15
5
Question on approximations of full logistic regression model
Hi, I am trying to construct a logistic regression model from my data (104 patients and 25 events). I build a full model consisting of five predictors with the use of penalization by rms package (lrm, pentrace etc) because of events per variable issue. Then, I tried to approximate the full model by step-down technique predicting L from all of the componet variables using ordinary least squares
2011 Oct 22
5
interpreting bootstrap corrected slope [rms package]
Dear List: Below is the validation output of a fitted ordinal logistic model using the bootstrap in the rms package. My interpretation is that most of the corrected indices indicate little overfitting, however the slope seems to indicate that the model is too optimistic. Given that most of the corrected indices seem reasonable, would it be appropriate to use this model on future data if the
2009 Aug 19
1
Best performance measure?
Hello, I working on a model to predict probabilities. I don't really care about binary prediction accuracy. I do really care about the accuracy of my probability predictions. Frank was nice enough to point me to the val.prob function from the Design library. It looks very promising for my needs. I've put together some tests and run the val.prob analysis. It produces some very
2011 May 19
2
recursive function
Hi, I created a function for obtaining the normal cumulative distribution (I know all this already exists in R, I just wanted to verify my understanding of it). below is the code I came up with. cdf<-function(x) { erf<-function(x) { # approximation to the error function (erf) of the # normal cumulative distribution function # from Winitzki
2007 Mar 03
2
Sigmoidal fitting
I am trying to write a function that fits a sigmoid given a X and Y vector guessing the start parameters. I use nls. What I did (enclosed) seems to work well with many data points but if I want to fit small vectors like : pressure <- c(5,15,9,35,45) gas <- c(1000,2000,3000,4000,5000) it do not work. The help page says that it do no not work on zero residual data. Massimo Cressoni
2009 Mar 11
4
R-help: grep in for loop using index - doesn't work
Hi everyone I am trying to use grep in a for loop to compare a string value. It works if I use the actual index value but when I use the for loop index, it doesn't work. Any suggestions plz. Here is the code: data <- read.table(file="Sigmoid.csv", head=FALSE, sep=","); c1 <- data$V1 c2 <- data$V2 c3 <- data$V3 c1data <- data.frame(c1); c2data <-
2003 Apr 23
1
nls: Missing value or an Infinity produced when evaluating the model
Hi, I am trying to fit a sigmoid curve to some data with nls but I am getting into some trouble. Seems that the optimization method is getting down to some parameter estimates that make the equation unsolvable. This is an example: >growth<-data.frame(Time=c(5,7,9,11,13,15,17,19,21,23,25,27),BodyMass=c(45,85,125,210,300,485,570,700,830,940,1030,1120))
2007 Mar 22
1
non-linear curve fitting
Hi list, I have a little curve fitting problem. I would like to fit a sigmoid curve to my data using the following equation: f(x) = 1/(1 + exp(-(x-c)*b)) (or any other form for that matter) Where x is the distance/location within the dataframe, c is the shift of the curve across the dataframe and b is the steepness of the curve. I've been playing with glm() and glm.fit() but without
2011 Jul 07
1
Generalized Logistic and Richards Curve
Dear R helpers, I am not a statistician and right now struggling with Richards curve. Wikipedia says (http://en.wikipedia.org/wiki/Generalised_logistic_function) The "generalized logistic curve or function", also known as Richard's curve is a widely-used and flexible sigmoid function for growth modelling, extending the well-known logistic curve. Now I am confused and will like to
2008 Jul 14
2
modeling binary response variables
R-devotees, I have a question about modeling in the case where the response variable is binary. I have a case where I have a response variable that is the probability of success, and four descriptor variables, The response has a sigmoid response with one of the variables. I would like to test for the effect of the various descriptor variables on the percentage success of the binary trait. I have
2010 Dec 09
1
error in lrm( )
Dear Sir or Madam? I am a doctor of urology,and I am engaged in developing a nomogram of bladder cancer. May I ask for your help on below issue? I set up a dataset which include 317 cases. I got the Binary Logistic Regression model by SPSS.And then I try to reconstruct the model ?lrm(RECU~Complication+T.Num+T.Grade+Year+TS)? by R-Project,and try to internal validate the model through