[R] bestglm function and output in R
Dennis Murphy
djmuser at gmail.com
Mon Oct 24 18:14:22 CEST 2011
Hi:
bestglmtest is your input data frame, is it not? From the names() line,
you can see that it has no variable named BestModel that corresponds
to a list containing a component named coefficients.
Were you perhaps looking for
output$BestModel$coefficients ??
Dennis
On Mon, Oct 24, 2011 at 8:35 AM, Candice <candice.lyons at hotmail.com> wrote:
> Hi all,
>
> I have been trying to run a bestglm in R for a while now and am struggling
> to get it to run. When I thought I had succeeded, the "output" it gave me
> was "NULL" and that's it. Below is my code:
>
> bestglmtest<-read.table("C:\\Documents and
> Settings\\clyons\\Desktop\\bestglmtest.txt",header=T,row.names=1)
>> names(bestglmtest)
> [1] "acc" "age" "sex" "ctmin"
>> library(bestglm)
>> output<-bestglm(bestglmtest,IC="AIC",family=gaussian(link=identity))
> Morgan-Tatar search since family is non-gaussian.
>> bestglmtest$BestModel$coefficients
> NULL
>
> I believ my data is Gaussian so don't get the Morgan-Tatar search
> "error/warning" which it threw out. Trying to find info on it was also not
> successful but I did manage to find an article with example which also had
> the same message and figured out it was not an error message but a warning,
> if I can say that. Asking for the best mode coefficients however, did not
> provide me with any useful answers.
>
> What I want to do is predict how four factors/parameters (this example is
> only three because I was testing the code) influence my response variable. I
> have my response variable in the very last column of my text file with
> predictors before it. Two of my predictors have two levels and the other two
> have three levels. Perhaps this makes a difference to the ditribution type I
> select?
>
> Any help would be greatly appreciated since I am now rightly stuck and have
> no idea what else to try.
>
> Many thanks,
> Candice
>
> --
> View this message in context: http://r.789695.n4.nabble.com/bestglm-function-and-output-in-R-tp3933547p3933547.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list