[R] general linear model and generalized linear model

2006-07-01 Thread zhijie zhang
Dear friends, I searched the R site and found a lot of results on general linear model and generalized linear model , and i was confused by them. Here, I only want to get some concise answers on the following questions and i'll study it by your hints: 1. Which function(package) could be used to

[R] SUMMARY: making contour plots using (x,y,z) data

2006-07-01 Thread Ajay Narottam Shah
Folks, A few days ago, I had asked a question on this mailing list about making a contour plot where a function z(x,y) is evaluated on a grid of (x,y) points, and the data structure at hand is a simple table of (x,y,z) points. As usual, R has wonderful resources (and subtle complexity) in doing

Re: [R] general linear model and generalized linear model

2006-07-01 Thread Tobias Verbeke
- Oorspronkelijk bericht - Van: zhijie zhang [mailto:[EMAIL PROTECTED] Verzonden: zaterdag, juli 1, 2006 08:50 AM Aan: r-help@stat.math.ethz.ch Onderwerp: [R] general linear model and generalized linear model Dear friends, I searched the R site and found a lot of results on general

Re: [R] getting the smoother matrix from smooth.spline

2006-07-01 Thread Simon Wood
maybe not directly, as it's returning the hat/influence/smoother matrix rather than the model/design matrix itself... however a similar trick which manipulated the `fit$coef' component of a single spline fit and then predicted from this at the x values would be one way of extracting the model

[R] Start Model for POLYCLASS

2006-07-01 Thread Xiaogang Su
Dear all, I have a question on how to set up the starting model in POLYCLASS and make sure the terms in the starting model retained in the final POLYCLASS model. In the function POLYMARS, this can be done using the STARTMODEL option. See below for example, I started with model y= b0 + b1*X1 +

Re: [R] Way to convert data frame to matrix

2006-07-01 Thread Charles C. Berry
I think this will do what you want: dframe - read.table(your.text.file, other args as needed ) mat - tapply(dframe[,3],dframe[,1:2],c) On Fri, 30 Jun 2006, Wade Wall wrote: I have a text file that I have imported into R. It contains 3 columns and 316940 rows. The first column is

Re: [R] polynomial expansion in R

2006-07-01 Thread Martin Maechler
yyan == yyan liu [EMAIL PROTECTED] on Fri, 30 Jun 2006 21:11:31 -0700 (PDT) writes: yyan Hi: I have two vectors of data, x and y and I want to yyan get the polynomial expansion of (x+y)^p with any yyan integer power p in R. Suppose p=2, then I want a yyan matrix of five

[R] nlme: correlation structure in gls and zero distance

2006-07-01 Thread Patrick Giraudoux
Dear listers, I am trying to model the distribution of fox density over years in the Doubs department. Measurements have been taken on 470 plots in March each year and georeferenced. Average density is supposed to be different each year. In a first approach, I would like to use a general

[R] curiosity question: new graphics vs. old graphics subsystem

2006-07-01 Thread ivo welch
I just read paul murrell's new book, R graphics. now, I have always used the traditional graphics system. apparently, the new (trellis?) system is an entirely separate graphics system. after reading the book, I cannot figure out what the intrinsic capability advantage of the old graphics system

[R] Data Manipulations - Group By equivalent

2006-07-01 Thread zubin
Hello, a beginner R user - boy i wish there was a book on just data manipulations for SAS users learning R (equivalent to the SAS DATA STEP).. Okay, my question: I have a panel data set, hotel data occupancy by month for 12 months, 1000 hotels. I have a field labeled 'year' and want to

Re: [R] Data Manipulations - Group By equivalent

2006-07-01 Thread Frank E Harrell Jr
zubin wrote: Hello, a beginner R user - boy i wish there was a book on just data manipulations for SAS users learning R (equivalent to the SAS DATA STEP).. Okay, my question: I have a panel data set, hotel data occupancy by month for 12 months, 1000 hotels. I have a field labeled

Re: [R] Data Manipulations - Group By equivalent

2006-07-01 Thread Wensui Liu
Zubin, I bet you are working for intercontinental hotels and think you probably are not the real Zubin there. right? ^_^. If you have chance, could you please say hi to him for me? Here is a piece of R code I copy from my blog side by side with SAS. You might need to tweak it a little to get

[R] replace values?

2006-07-01 Thread zhijie zhang
Dear friends, i have a dataset like this: x y z 1 2 3 2 3 1 3 2 1 1 1 3 2 1 2 3 2 3 2 1 1 I want to replace x with the following values:1-a,2-b,3-c,4-d; replace y with the following values:1-b,2-a,3-c,4-d; replace z with the following values:1-d,2-c,3-b,4-a;

[R] Optional variables in function?

2006-07-01 Thread Jonathan Greenberg
I'm a bit new to writing R functions and I was wondering what the best practice for having optional variables in a function is, and how to test for optional and non-optional variables? e.g. if I have the following function: helpme - function(a,b,c) { } In this example, I want c to be an