[R] summary polr
Michael Dewey
info at aghmed.fsnet.co.uk
Tue Feb 20 16:21:00 CET 2007
At 14:41 20/02/2007, you wrote:
Please do not just reply to me,
1 - I might not know
2 - it breaks the threading
>Hi
>
>here there is an example extracted from polr help in MASS:
>
>The function could be:
>
> temp <- function(form, dat) {
> house.plr <- polr(formula =
> form, weights = Freq, data = dat)
> coeff <- summary(house.plr)
> return(coeff)}
Why do you try to redefine the coeff extractor function?
Try calling the results of summary summ or some
other obvious name and I think you will find the problem goes away.
See also
> library(fortunes)
> fortune("dog")
Firstly, don't call your matrix 'matrix'. Would you call your dog 'dog'?
Anyway, it might clash with the function 'matrix'.
-- Barry Rowlingson
R-help (October 2004)
>the function can be called by:
>
> temp(Sat ~ Infl + Type + Cont, housing)
>
>where all data is available from MASS, as it is
>an example in R Help on 'polr'.
>
>Results are:
>
> Re-fitting to get Hessian
>
> Error in eval(expr, envir, enclos) : object "dat" not found
>
>Paolo Accadia
>
>
> >>> Michael Dewey <info at aghmed.fsnet.co.uk> 20/02/07 1:43 PM >>>
>At 15:21 19/02/2007, Paolo Accadia wrote:
> >Hi all,
> >
> >I have a problem to estimate Std. Error and
> >t-value by âpolrâ in library Mass.
>s.
> >They result from the summary of a polr object.
> >
> >I can obtain them working in the R environment
> with the following statements:
> >
> > temp <- polr(formula = formula1, data = data1)
> > coeff <- summary(temp),
> >
> >but when the above statements are enclosed in a
> >function, summary reports the following error:
> >
> >Error in eval(expr, envir, enclos) : object "dat" not found
> >
> >Someone knows how I can solve the problem?
>
>By giving us a short reproducible example?
>
>Specifically we do not know:
>1 - what formula1 is
>2 - what the structure of data1 is
>3 - what the enclosing function looks like
>4 - what dat is
>
>
> >Thanks for any help.
> >Paolo
>
>Michael Dewey
>http://www.aghmed.fsnet.co.uk
Michael Dewey
http://www.aghmed.fsnet.co.uk
More information about the R-help
mailing list