similar to: get optim results into a model object

Displaying 20 results from an estimated 1000 matches similar to: "get optim results into a model object"

2011 Oct 16
2
How to plot CI's (llim ulim) on ecodist mgram
I would like to put confidence intervals on a mantel corellogram they are already calculated in the pmgram object but I am unsure how I get the x value in order to plot them? package(ecodist) X<-1:100 Y<-rnorm(1:100) Z<-rnorm(1:100) XY<-dist(data.frame(X,Y)) YX<-dist(data.frame(Y,X)) my.mgram<-mgram(XY,XZ) plot(my.mgram) print(my.mgram) > print(my.mgram) $mgram
2009 Jul 09
2
naming of columns in R dataframe consisting of mixed data (alphanumeric and numeric)
Hello, I have an r function that creates the following dataframe tresults2. Notice that column 1 does not have a column heading. Tresults2: [,1] estparam 18.00000 nullval 20.00000 . . . ciWidth 2.04622 HalfInterval 1.02311 pertinent code: results<-cbind( estparam, nullval, t, pv_left, pv_right, pv_two_t, estse, df, cc, tbox, llim, ulim, ciWidth,
2012 Jan 27
1
Help boxplot to add mean, standard error and/or stadard deviation
Dear researchers I wish to plot a box plot without the mean line (the black line) and plot only the mean (red square). Futhermore, is it possible to add standard error and/or stadard deviation? This is an example mytest <- c(2.1,2.6,2.7,3.2,4.1,4.3,5.2,5.1,4.8,1.8,1.4,2.5,2.7,3.1,2.6,2.8) boxplot(mytest,lty = "solid") means <- mean(mytest,na.rm=TRUE) points(means, pch = 22, col
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA. This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error. is it possible to perform this test in ecodist? many thanks
2000 Sep 20
1
integration in R?
I have the following problem. inf p= Int [dnorm(x-d) * pnorm(x) ^ (m-1)] dx -inf Given p and m, I want to find d. For example, p m d .9 2 1.81 Is there a way to solve this problem in R? Ideally I would have a function with arguments p and m, and output d. Thanks very much for any help. Bill -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing
2005 Feb 17
1
Factor level coloring in trellis plot
Hi :) Was just wondering whether someone could help me with adjustments to trellis plots (parallel). I've got two way multivariate data. I want to make parallel plots for one of the factors, and want to color the lines according to the other factor. The first thing I manage, but with the other I'm lost :( Can only change the overall color. This is basically how far I get:
2010 Oct 26
1
Dispersion ( Plot error bars ) help
Dear List, I am looking to plot error bars on a line using dispersion. I have values for the upper value and for the lower values, however i am unsure how to plot different values for the upper CI and the lower CI? I have been using dispersion(1:35,sim,simCI,col="red") Where there are 35 points, and simCI relates to a vector containing the lower confidence intervals, however i want
2011 Jan 20
1
Problems with ecodist
Dear Dr.Goslee and anyone may intrested in matrix manipulate, I am using your ecodist to do mantel and partial mantel test, I have locality data and shape variation data, and the two distance matrixs are given as belowings. When I run the analysis, it is always report that the matrix is not square, but I didn't know what's wrong with my data. Would you please help me on this. I am quite
2002 Mar 08
1
Matrix multiplication problem
Dear List, I am having trouble with some R code I have written to perform Redundancy Analysis (RDA) on a matrix of species abundance data (Y) and a matrix of environmental data (X). RDA is a constrained form of PCA and can be thought of as a PCA of the fitted values of a regression of each variable in Y on all variables in X. For info, the first use of RDA is in: Rao, C.R, 1964. The use and
2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-Lemeshow: p=0.6163585 le Cessie and Houwelingen test (Design library): p=0.2843620
2010 Jan 16
2
predict.glm
Hi, See below I reply your message for <https://stat.ethz.ch/pipermail/r-help/2008-April/160966.html>[R] predict.glm & newdata posted on Fri Apr 4 21:02:24 CEST 2008 You say it ##works fine but it does not: if you look at the length of yhat2, you will find 100 and not 200 as expected. In fact predict(reg1, data=x2) gives the same results as predict(reg1). So I am still looking for
2001 Apr 27
3
nls question
I have a question about passing arguments to the function f that nlm minimizes. I have no problems if I do this: x<-seq(0,1,.1) y<-1.1*x + (1-1.1) + rnorm(length(x),0,.1) fn<-function(p) { yhat<-p*x+(1-p) sum((y-yhat)^2) } out<-nlm(fn,p=1.5,hessian=TRUE) But I would like to define fn<-function(x,y,p) { yhat<-p*x+(1-p) sum((y-yhat)^2) } so
2012 Mar 08
1
sas retain statement in R or fitting differene equations in NLS
I wish to fit a dynamical model in R and I am running in a problem that requires some of your wisdom to solve. For SAS users I am searching for the equivalent of the */retain/ *statement. For people that want to read complicated explanations to help me: I have a system of two equations written as difference equations here. To boil it down. I have a dataframe with three variables y, X1, X2
2010 Feb 13
2
lm function in R
Hello, I am trying to learn how to perform Multiple Regression Analysis in R. I decided to take a simple example given in this PDF: http://www.utdallas.edu/~herve/abdi-prc-pretty.pdf I created a small CSV called, students.csv that contains the following data: s1 14 4 1 s2 23 4 2 s3 30 7 2 s4 50 7 4 s5 39 10 3 s6 67 10 6 Col headers: Student id, Memory span(Y), age(X1), speech rate(X2) Now
2008 Sep 16
2
Hosmer- Lemeshow test
Dear R - help, I am working on the Credit scorecard model. I am using the Logistic regression to arrive at the regression coefficients model. I want to use the Hosmer - Lemeshow test . In order to understand the use of R - language, I had referred the following URL       http://www.stat.sc.edu/~hitchcock/diseaseoutbreakRexample704.txt The related data 'diseaseoutbreak' is available
2012 Jan 13
1
Problems with plotCI
Got problems with plotCI (plotrix) I only want to plot the upper part of the error bar in my barplot I had the exact same commands working two months ago Now I wanted to change the legend and when I ran it again plotCI stopped working. To me it seems like there must some bug in R library(plotrix) library (graphics) x = matrix(c( 13.75516276, 3.944604404,
2006 Apr 01
1
Nested error structure in nonlinear model
I am trying to fit a nonlinear regression model to data. There are several predictor variables and 8 parameters. I will write the model as Y ~ Yhat(theta1,...,theta8) OK, I can do this using nls() - but "only just" as there are not as many observations as might be desired. Now the problem is that we have a factor "Site" and I want to include a corresponding error
2013 Apr 23
1
Hosmer Lemeshow test
Hi to everybody. I use the following routine (i found it in the internet) to compute the Hosmer-Lemeshow test in the framework of logistic regression. hosmerlemeshow = function(obj, g=10) { # first, check to see if we fed in the right kind of object stopifnot(family(obj)$family=="binomial" && family(obj)$link=="logit") y = obj$model[[1]] # the double bracket
2008 Nov 07
1
two kind of Hosmer and Lemeshow’s test
I know that there are two method to apply the Hosmer and Lemeshow?s. One of them is calculated based on the fixed and pre-determined cut-off points of the estimated probability of success. One of them is calculated based on the percentiles of estimated probabilities. In the previous post,i find that the Hosmer and Lemeshow?s test how to use in R. hosmerlem <- function (y, yhat, g = 10) {
2010 Apr 25
1
function pointer question
Hello, I have the following function that receives a "function pointer" formal parameter name "fnc": loocv <- function(data, fnc) { n <- length(data.x) score <- 0 for (i in 1:n) { x_i <- data.x[-i] y_i <- data.y[-i] yhat <- fnc(x=x_i,y=y_i) score <- score + (y_i - yhat)^2 } score <- score/n