[R] writing selfStart models that can deal with treatment effects

2009-11-12 Thread Michael A. Gilchrist
Hello, I'm trying to do some non-linear regression with 2 cell types and 4 tissue type treatments using selfStart models Following Ritz and Streibig (2009), I wrote the following routines: ##Selfstart expDecayAndConstantInflowModel - function(Tb0, time, aL, aN, T0){

[R] Interpreting gnls() output in comparison to nls()

2009-10-30 Thread Michael A. Gilchrist
Hi, I've been trying to work with the gnls() function in the nlme package. My decision to use gnls() was so that I could fit varPower and such to some of the data. However, in working with a small dataset, I've found that the results given by gnls() don't seem to make any sense and they

Re: [R] removing random effect from nlme or using varPower() in nls

2009-10-23 Thread Michael A. Gilchrist
Hi Kingsford, That's exactly what I was looking for! Thanks. Mike On Thu, 22 Oct 2009, Kingsford Jones wrote: help(gnls, pack=nlme) hth, Kingsford Jones On Thu, Oct 22, 2009 at 4:36 PM, Michael A. Gilchrist mi...@utk.edu wrote: Hello, I've been fitting a random effects model using

[R] removing random effect from nlme or using varPower() in nls

2009-10-22 Thread Michael A. Gilchrist
Hello, I've been fitting a random effects model using nlme to some data, but I am discovering that the variation in my random effect is very small. As a result, I would like to replace it as a fixed effect (i.e. essentially fit the same model but with no random effect). As I understand it

Re: [R] custom selfStart model works with getInitial but not nls

2009-10-17 Thread Michael A. Gilchrist
On Sat, 17 Oct 2009, Douglas Bates wrote: On Fri, Oct 16, 2009 at 7:09 PM, Michael A. Gilchrist mi...@utk.edu wrote: Hello, I'm having problems creating and using a selfStart model with nlme.  Briefly, I've defined the model, a selfStart object, and then combined them to make

Re: [R] Proper syntax for using varConstPower in nlme

2009-10-16 Thread Michael A. Gilchrist
, Dieter Menne wrote: Michael A. Gilchrist wrote: - nlme(Count ~ quad.PBMC.model(aL, aN, T0), + data = tissueData, + weights = varConstPower(form =~ Count), + start = list( fixed = c(rep(1000, 8), -2, -2) ), + fixed = list(T0 ~ TypeTissue-1, aL

[R] custom selfStart model works with getInitial but not nls

2009-10-16 Thread Michael A. Gilchrist
Hello, I'm having problems creating and using a selfStart model with nlme. Briefly, I've defined the model, a selfStart object, and then combined them to make a selfStart.default model. If I apply getInitial to the selfStart model, I get results. However, if I try usint it with nls or

[R] Setting random effects within a category using nlme

2009-10-15 Thread Michael A. Gilchrist
Hello, I will start out with the caveat that I'm not a statistician by training, but have a fairly decent understanding of probability and likelihood. Nevertheless, I'm trying to fit a nonlinear model to a dataset which has two main factors using nlme. Within the dataset there are two Type

[R] Proper syntax for using varConstPower in nlme

2009-10-15 Thread Michael A. Gilchrist
Hello, Excuse me for posting two questions in one day, but I figured it would be better to ask my questions in separate emails. I will again give the caveat that I'm not a statistician by training, but have a fairly decent understanding of probability and likelihood. As before, I'm trying

Re: [R] reading in results from system(). There must be an easier way...

2008-09-22 Thread Michael A. Gilchrist
, Michael A. Gilchrist [EMAIL PROTECTED] wrote: Wow, that's elegant and simple. It's also faster than my approach. NB, you don't need to use close(), read.delim() closes the pipe when its done reading. If read.delim() close the connection in this case, it's a bug. It should only close the connection

Re: [R] reading in results from system(). There must be an easier way...

2008-09-18 Thread Michael A. Gilchrist
- On Fri, 12 Sep 2008, Prof Brian Ripley wrote: Why not use con - pipe(COMMAND) foo - read.delim(con, colClasses=numeric) close(con) ? See the 'R Data Input/Output Manual'. On Fri, 12 Sep 2008, Michael A. Gilchrist wrote: Hello, I am currently using R to run an external program and then read

[R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Michael A. Gilchrist
Hello, I am currently using R to run an external program and then read the results the external program sends to the stdout which are tsv data. When R reads the results in it converts it to to a list of strings which I then have to maniuplate with a whole slew of commands (which, figuring

[R] switch() usage

2008-08-26 Thread Michael A. Gilchrist
Hello, I am wondering if it is possible to run separate lines of code within switch() as one can do in most languages. For example, I'd like to have switch execute a few lines of code based on the value passed to it. For example, index = 1 switch(index, command 1; command 2;

Re: [R] switch() usage

2008-08-26 Thread Michael A. Gilchrist
:[EMAIL PROTECTED] On Behalf Of Michael A. Gilchrist Sent: Tuesday, August 26, 2008 6:03 PM To: r-help@r-project.org Subject: [R] switch() usage Hello, I am wondering if it is possible to run separate lines of code within switch() as one can do in most languages. For example, I'd like to have switch