similar to: nls() vs lm() estimates

Displaying 20 results from an estimated 1000 matches similar to: "nls() vs lm() estimates"

2008 Jun 12
1
Problems with mars in R in the case of nonlinear functions
Hi, I'm trying to use mars function in R to interpolate nonlinear multivariate functions. However, it seems that mars gives me a fit which uses only very few basis function and it underfits very badly. For example, I have tried the following code to test mars: require("mda") f <- function(x,y) { x^2-y^2 }; #f <- function(x,y) { x+2*y }; # Grid x <-
2007 Jun 12
2
barplot and map overlay
Hi, I wonder if it is possible with the graphics package to overlay one or several plots (barplots, for example) over a map. Data for the map is in a data frame with the latitude and longitude coordinates, and then: > plot(map$long, map$lat, type ="l") produces the map. I want to put each barplot in specific locations on the map, namely at the center of "statistical
2009 Jan 19
2
plotting arrows with different colors and varying head size
Dear list, I would like to plot arrows with different colors according to arrow length, and also (if possible) with head size proportional to arrow length. The idea is to make a quiver-like plot of matlab with wind speed data. So far, I´ve been able to use different colors, but I need to find a more efficient way to recode arrow length intervals into colors. On the contrary, I can't define
2007 Jul 04
1
retrieving stats from bwplot
Hi all, I want to retrieve the stats from a 'bwplot' with one factor. I have read the help for 'panel' function and I'm aware of the option 'stats' which defaults to 'boxplot.stats' but I didn't understand it well and therefore I am unable to get what I need. Thanks in advance. Héctor Villalobos Windows XP, R 2.5.0 > bwplot(decrease ~ colpos |
2017 Aug 16
1
Bias-corrected percentile confidence intervals
Hi folks, I'm trying to estimate bias-corrected percentile (BCP) confidence intervals on a vector from a simple for loop used for resampling. I am attempting to follow steps in Manly, B. 1998. Randomization, bootstrap and monte carlo methods in biology. 2nd edition., p. 48. PDF of the approach/steps should be available here: https://wyocoopunit.box.com/s/9vm4vgmbx5h7um809bvg6u7wr392v6i9 If
2009 Aug 10
1
manipulating text to generate different formulas to use in nls()
Hello, In doing a series of non-linear estimations of a function which is a sum of a varying number of sinusoids, I would like to "autogenerate" the arguments needed by nls() depending on that number. For example, when there are two sinusoids: > nls( y ~ mu + A1 * cos(2*pi*f1*x - P1) + A2 * cos(2*pi*f2*x - P2), data = some.xy.data, start = list( mu=some.value0,
2010 Jan 19
4
coping with a warning in if()
Hi, I'm sure this one is very easy.... I am trying to write a function where one of its arguments has two posible (strings) values, defaulting to one of them if none is specified. My problem is that when evaluating the function the following warning is produced: "the condition has length > 1 and only the first element will be used" I've read the help page of if() but I
2012 Oct 11
0
Error with cForest
All -- I have been trying to work with the 'Party' package using R v2.15.1 and have cobbled together a (somewhat) functioning code from examples on the web. I need to run a series of unbiased, conditional, cForest tests on several subsets of data which I have made into a loop. The results ideally will be saved to an output file in matrix form. The two questions regarding the script in
2010 Jun 29
1
Model validation and penalization with rms package
I?ve been using Frank Harrell?s rms package to do bootstrap model validation. Is it the case that the optimum penalization may still give a model which is substantially overfitted? I calculated corrected R^2, optimism in R^2, and corrected slope for various penalties for a simple example: x1 <- rnorm(45) x2 <- rnorm(45) x3 <- rnorm(45) y <- x1 + 2*x2 + rnorm(45,0,3) ols0 <- ols(y
2004 Feb 03
1
Error in f(x, ...) : subscript out of bounds
R-Listers: I am doing a quasi-maximum likelihood estimation and I get a "subscript out of bound" error message, Typically I would think this means that a subscript used in the function is literally out of bounds however I don't think this is the case. All I change in the code is a constant, that is hard-wired in (not data dependent and not parameter dependent), furthermore,
2010 Mar 20
2
different forms of nls recommendations
Hello, Using this data: http://n4.nabble.com/file/n1676330/US_Final_Values.txt US_Final_Values.txt and the following code i got the image at the end of this message: US.final.values<-read.table("c:/tmp/US_Final_Values.txt",header=T,sep=" ") US.nls.1<-nls(US.final.values$ECe~a*US.final.values$WTD^b+c,data=US.final.values,start=list(a=2.75,b=-0.95,c=0.731),trace=TRUE)
2006 Sep 12
4
variables in object names
Is there any way to put an argument into an object name. For example, say I have 5 objects, model1, model2, model3, model4 and model5. I would like to make a vector of the r.squares from each model by code such as this: rsq <- summary(model1)$r.squared for(i in 2:5){ rsq <- c(rsq, summary(model%i%)$r.squared) } So I assign the first value to rsq then cycle through models 2 through
2006 Jan 16
1
rsq.rpart not found ...
Hi to all I tried help.search("rsq") and found Help files with alias or concept or title matching 'rsq.rpart' using regular expression matching: rsq.rpart(rpart) Plots the Approximate R-Square for the Different Splits then I tried to use the function but I got the error object not found must I load any package before? there is nothing in the
2004 Apr 23
1
Extracting the MSE and % Variance from RandomForest
Several ways: 1. Read ?randomForest, especially the `Value' section. 2. Look at str(myforest.rf). 3. Look at print.randomForest. If the forest has 100 trees, then the mse and rsq are vectors with 100 elements each, the i-th element being the mse (or rsq) of the forest consisting of the first i trees. So the last element is the mse (or rsq) of the whole forest. HTH, Andy > From: David
2013 Jan 11
0
Error with looping through a list of strings as variables
Dear R users: I have been trying to figure out how to include string variables in a for loop to run multiple random forests with little success. The current code returns the following error: Error in trafo(data = data, numeric_trafo = numeric_trafo, factor_trafo = factor_trafo, : data class character is not supported In addition: Warning message: In storage.mode(RET@predict_trafo) <-
2015 Feb 23
0
[Mesa-dev] [PATCH 2/2] nvc0/ir: improve precision of double RCP/RSQ results
Oh right. I think the NVIDIA blob executes those steps conditionally based on the upper bits not being 0x7ff (== infinity/nan). I should do the same thing here. [FWIW I was able to test the nv50 code last night and that one's a total fail for rcp/rsq... will need to port that over to my nvc0 and debug there.] On Mon, Feb 23, 2015 at 8:24 AM, Roland Scheidegger <sroland at vmware.com>
2010 Apr 29
1
R CMD check Error after R CMD build for R-2.11.0
Dear UseR, I get an error when I run "R CMD check" on my .tar.gz file package, and I don't understand why since I don't obtain any error with "R CMD check" on the package directory. Do you have any idea ? $ sudo ./R-2.11.0/bin/R CMD check eqtl_1.1.tar.gz and $ sudo ./R-2.11.0/bin/R CMD --check-subdirs=no eqtl_1.1.tar.gz return an Error * checking for working
2004 May 14
1
help with memory greedy storage
Hello, I've a problem with a self written routine taking a lot of memory (>1.2Gb). Maybe you can suggest some enhancements, I'm pretty sure that my implementation is not optimal ... I'm creating many linear models and store coefficients, anova p-values ... all I need in different lists which are then finally returned in a list (list of lists). The input is a matrix with 84 rows
2015 Feb 23
0
[PATCH 2/2] nvc0/ir: improve precision of double RCP/RSQ results
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- Not sure how many steps are needed for the necessary accuracy. Just doing 2 because that seems like a reasonable number. .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 42 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
2015 Feb 23
2
[PATCH 1/2] nv50/ir: add fp64 support on G200 (NVA0)
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- Untested beyond compiling a few shaders to see if they look like they might work. nvdisasm agrees with envydis's decoding of these things. Will definitely get ahold of a G200 to run tests on before pushing this. .../drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 94 ++++++++++++++++++---