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 fit the general linear model ? 2. Which function(package) could be used to fit the generalized linear model ? 3. How to tell them which variables in my dataset are categorical variables that will be used as dummy variables? Thanks very much! -- Kind Regards, Zhi Jie,Zhang ,PHD Department of Epidemiology School of Public Health Fudan University Tel:86-21-54237149 [[alternative HTML version deleted]]
Tobias Verbeke
2006-Jul-01 08:58 UTC
[R] general linear model and generalized linear model
>----- Oorspronkelijk bericht ----- >Van: zhijie zhang [mailto:epistat at gmail.com] >Verzonden: zaterdag, juli 1, 2006 08:50 AM >Aan: r-help at 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 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 fit the general linear model ?Function lm from the stats package (which comes with R). See ?lm>2. Which function(package) could be used to fit the generalized linear model >?Function glm from the stats package. See ?glm Chapter 11 of `An Introduction to R' (which comes with R and is available on CRAN) is devoted to statistical models in R and has sections on linear models and generalized linear models. Cf. http://cran.r-project.org/manuals.html>3. How to tell them which variables in my dataset are categorical variables >that will be used as dummy variables?You should (only) make sure these variables are so-called factors (which is the way R represents categorical variables). Chapter 4 of `An Introduction to R' is entirely devoted to factors. HTH, Tobias>Thanks very much! > > >-- >Kind Regards, >Zhi Jie,Zhang ,PHD >Department of Epidemiology >School of Public Health >Fudan University >Tel:86-21-54237149 > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >
Seemingly Similar Threads
- Specify a correct formula in R for Piecewise Linear Functions?
- Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
- handle dates in R?
- how to get the variance-covariance matrix/information of alpha and beta after fitting a GLMs?
- How to add legend for image()?