similar to: boot.stepAIC fails with computed formula

Displaying 20 results from an estimated 1000 matches similar to: "boot.stepAIC fails with computed formula"

2017 Aug 23
3
boot.stepAIC fails with computed formula
Until I get a fix that works, a work-around would be to rename the 'y1' column, used a fixed formula, and rename it back afterwards. Thanks for your help. SGO. -----Original Message----- From: Bert Gunter [mailto:bgunter.4567 at gmail.com] Sent: 22 August 2017 20:38 To: Stephen O'hagan <SOhagan at manchester.ac.uk> Cc: r-help at r-project.org Subject: Re: [R] boot.stepAIC
2017 Aug 23
0
boot.stepAIC fails with computed formula
It seems that if you build the formula as a character string, and postpone the "as.formula" into the lm call, it works. instead of frm1 <- as.formula(paste(trg,"~1")) use frm1a <- paste(trg,"~1") and then strt <- lm(as.formula(frm1a),dat) regards, Heinz Stephen O'hagan wrote/hat geschrieben on/am 23.08.2017 12:07: > Until I get a fix that works, a
2017 Aug 22
0
boot.stepAIC fails with computed formula
OK, here's the problem. Continuing with your example: strt1 <- lm(y1 ~1, dat) strt2 <- lm(frm1,dat) > strt1 Call: lm(formula = y1 ~ 1, data = dat) Coefficients: (Intercept) 41.73 > strt2 Call: lm(formula = frm1, data = dat) Coefficients: (Intercept) 41.73 Note that the formula objects of the lm object are different: strt2 does not evaluate the formula. So
2017 Aug 22
1
boot.stepAIC fails with computed formula
SImplify your call to lm using the "." argument instead of manipulating formulas. > strt <- lm(y1 ~ ., data = dat) and you do not need to explicitly specify the "1+" on the rhs for lm, so > frm2<-as.formula(paste(trg," ~ ", paste(xvars,collapse = "+"))) works fine, too. Anyway, doing this gives (but see end of output)" bst <-
2017 Aug 22
1
boot.stepAIC fails with computed formula
Failed? What was the error message? Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Aug 22, 2017 at 8:17 AM, Stephen O'hagan <SOhagan at manchester.ac.uk> wrote: > I'm trying to use boot.stepAIC for
2017 Aug 22
0
boot.stepAIC fails with computed formula
The error is "the model fit failed in 50 bootstrap samples Error: non-character argument" Cheers, SOH. On 22/08/2017 17:52, Bert Gunter wrote: > Failed? What was the error message? > > Cheers, > > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka
2006 Jul 26
2
Branching on 'grep' returns...
Greetings, all. I'm fiddling with some text manipulation in R, and I've found something which feels counterintuitive to my PERL-trained senses; I'm hoping that I can glean new R intuition about the situation. Here's an example, as concise as I could make it. trg<-c("this","that") # these two work as I'd expected. if ( grep("this",trg) ) {
2007 Sep 17
1
Stepwise logistic model selection using Cp and BIC criteria
Hi, Is there any package for logistic model selection using BIC and Mallow's Cp statistic? If not, then kindly suggest me some ways to deal with these problems. Thanks. -- View this message in context: http://www.nabble.com/Stepwise-logistic-model-selection-using-Cp-and-BIC-criteria-tf4464430.html#a12729613 Sent from the R help mailing list archive at Nabble.com.
2019 Sep 23
2
What is the best way to loop over an ALTREP vector?
Sorry for post a lot of things, for the first part of code, I copied my C++ iter macro by mistake(and you can see an explicit type casting). Here is the macro definition from R_exts/Itermacros.h #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype, vtype, \ strt, nfull, expr) do { \ * const** etype *px = DATAPTR_OR_NULL(sx); *
2019 Oct 23
2
Unexpected behavior when using macro to loop over vector
Hi all, I found an unexpected behavior when I was trying to use the macro defined in "R_ext/Itermacros.h" to loop over an atomic vector. Here is a minimum example: C++ code ``` #include "R_ext/Itermacros.h" #define GET_REGION_BUFSIZE 2 //Redefine the macro since C++ is not happy with the implicit type conversion #define ITERATE_BY_REGION_PARTIAL(sx, px, idx, nb, etype,
2023 Aug 20
3
Issues when trying to fit a nonlinear regression model
Dear friends, This is the dataset I am currently working with: >dput(mod14data2_random) structure(list(index = c(14L, 27L, 37L, 33L, 34L, 16L, 7L, 1L, 39L, 36L, 40L, 19L, 28L, 38L, 32L), y = c(0.44, 0.4, 0.4, 0.4, 0.4, 0.43, 0.46, 0.49, 0.41, 0.41, 0.38, 0.42, 0.41, 0.4, 0.4 ), x = c(16, 24, 32, 30, 30, 16, 12, 8, 36, 32, 36, 20, 26, 34, 28)), row.names = c(NA, -15L), class =
2019 Aug 28
3
What is the best way to loop over an ALTREP vector?
Hi devel team, I'm working on C/C++ level ALTREP compatibility for a package. The package previously used pointers to access the data of a SEXP, so it would not work for some ALTREP objects which do not have a pointer. I plan to rewrite the code and use functions like get_elt, get_region, and get_subset to access the values of a vector, so I have a few questions for ALTREP: 1. Since an
2019 Oct 25
2
Unexpected behavior when using macro to loop over vector
On 10/25/19 11:01 AM, Tomas Kalibera wrote: > On 10/23/19 6:45 AM, Wang Jiefei wrote: >> Hi all, >> >> I found an unexpected behavior when I was trying to use the macro >> defined >> in "R_ext/Itermacros.h"? to loop over an atomic vector. Here is a >> minimum >> example: >> >> C++ code >> ``` >> #include
2007 Jun 04
2
How to obtain coefficient standard error from the result of polr?
Hi - I am using polr. I can get a result from polr fit by calling result.plr <- polr(formula, data=mydata, method="probit"); However, from the 'result.plr', how can I access standard error of the estimated coefficients as well as the t statistics for each one of them? What I would like to do ultimately is to see which coefficients are not significant and try to refit the
2019 Sep 24
2
What is the best way to loop over an ALTREP vector?
Hi Bob, Thanks for sending around the link to that. It looks mostly right and looks like a useful onramp. There are a few things to watch out for though (I've cc'ed Romain so he's aware of these comments). @romain I hope you taake the following comments as they are intended, as help rather than attacks. The largest issue I see is that the contract for Get_region is that it *populates
2011 Sep 22
1
nlm's Hessian update method
Hi R-help! I'm trying to understand how R's nlm function updates its estimate of the Hessian matrix. The Dennis/Schnabel book cited in the references presents a number of different ways to do this, and seems to conclude that the positive-definite secant method (BFGS) works best in practice (p201). However, when I run my code through the optim function with the method as "BFGS",
2023 Aug 20
2
Issues when trying to fit a nonlinear regression model
Dear Bert, Thank you so much for your kind and valuable feedback. I tried finding the starting values using the approach you mentioned, then did the following to fit the nonlinear regression model: nlregmod2 <- nls(y ~ theta1 - theta2*exp(-theta3*x), start = list(theta1 = 0.37, theta2 = exp(-1.8), theta3 =
2008 Dec 02
2
question about the tisPlot function in package tis
List, I am using the 'tisPlot' function in Jeff Hallman's excellent tis package and was hoping that someone could spare me from having to dig into the code of his 'tisPlot' function. So far as I can tell, the preferred method of controlling the plotting of the x-axis is using the 'xTickFreq' and 'xTickSkip' options. Unfortunately, the where the data ends
2017 Feb 07
12
[Bug 12569] New: Missing directory errors not ignored
https://bugzilla.samba.org/show_bug.cgi?id=12569 Bug ID: 12569 Summary: Missing directory errors not ignored Product: rsync Version: 3.1.2 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: core Assignee: wayned at samba.org Reporter: axkibe
2023 Aug 20
1
Issues when trying to fit a nonlinear regression model
I got starting values as follows: Noting that the minimum data value is .38, I fit the linear model log(y - .37) ~ x to get intercept = -1.8 and slope = -.055. So I used .37, exp(-1.8) and -.055 as the starting values for theta0, theta1, and theta2 in the nonlinear model. This converged without problems. Cheers, Bert On Sun, Aug 20, 2023 at 10:15?AM Paul Bernal <paulbernal07 at