Displaying 1 result from an estimated 1 matches for "thepredictors".
2009 Jul 26
1
obtain names of variables and data from glm object
...re an elegant way--or the "right way" within the R way of thinking--to
obtain the names of the response variable, the predictor variables, and the
dataset, as character strings?
For instance, suppose the "right way" was to use the (currently fictitious)
functions theresponse(), thepredictors(), and theDataSet(). Then I would be
able to write a function that obtains the names and subsequently pastes text
along the following lines:
theResponse <- theresponse( myglm )
theFirstPredictor <- thepredictors( myglm )[1]
theDataSet <- theDataSet(myglm)
title(main= paste(theResponse...