Re: [R] Ifs in formula

2011-03-14 Thread Otto Kässi
Dennis, this works perfectly! Thanks, Otto On Fri, Mar 11, 2011 at 2:08 PM, Dennis Murphy wrote: > Hi: > > Perhaps something like > > f1(x, y) * I(z > 0) + f2(x, y) * I(z <= 0)  ?? > > HTH, > Dennis > > On Fri, Mar 11, 2011 at 3:10 AM, Otto Kässi wro

[R] Ifs in formula

2011-03-11 Thread Otto Kässi
Dear r-helpers, This might be an elementary question, but I have a hard time getting my head around it, so all help is much appreciated. I am working on a nonlinear regression model of the form if z > 0 y = f1(x,y), else y = f2(x,t) . In other words, the functional form of f(.) changes accordin

Re: [R] rms::ols & I(.) in formulas

2010-07-02 Thread Otto Kässi
-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Otto Kässi > Sent: Thursday, July 01, 2010 3:28 PM > To: r-help@r-project.org > Subject: [R] rms::ols & I(.) in formulas > > Dear R-helpers, > > To start I would like to thank Prof. Harrell for package rm

[R] rms::ols & I(.) in formulas

2010-07-01 Thread Otto Kässi
Dear R-helpers, To start I would like to thank Prof. Harrell for package rms. It is one of the most useful packages for R that I have encountered. Turning to my problem, I encountered a surprising problem when working with rms::ols. It seems that insulating terms in a formula by using I() to insu

Re: [R] Package plm & heterogenous slopes

2010-02-08 Thread Otto Kässi
Giovanni, Thank you for your reply. pvcm is indeed what I was looking for. I have a follow-up questio: plm documentation says that pvcm with method 'within' is equivalent of estimating a separate model for each individual. Let's assume that I would like to estimate a panel data model with an indi

[R] Package plm & heterogenous slopes

2010-02-03 Thread Otto Kässi
Dear r-helpers, I am working with plm package. I am trying to fit a fixed effects (or a 'within') model of the form y_it = a_i + b_i*t + e_it, i.e. a model with an individual-specific intercept and an individual- specific slope. Does plm support this directly? Thanks in advance! Otto Kassi __

[R] Package NP; npregbw; selective bandwidth selection

2009-09-01 Thread otto kässi
Dear R-users, I am fitting a kernel regression model of the form y ~ x1 + factor(x2) + factor(x3) and am using the function npregbw in the np-package to find the optimal bandwidths. My dataset is relatively large and the optimization takes quite long. When testing different specifications I hav