1

I need to see the code for the summary function which is used in mirt package to see the factor loading matrix.

I have tried edit(summary) which in return giving me this

function (object, ...) 
standardGeneric("summary")

which is not very helpful for me. How can I see the code for summary?

Thomas
  • 43,637
  • 12
  • 109
  • 140

1 Answers1

1

summary is a generic function. So you need to see the class-specific method for whatever type of object you're trying to summary-ize. E.g., see summary.lm (for lm objects). You don't specify the object class you're working with, so it's impossible to say what specific summary function you need to look at.

UPDATE: These are s4 generics, which is a bit more complicated than summary.lm, which is s3. Some quick googling reveals that you can see the relevant s4 methods on the package's Github page. The contents of summary will depend on what specific class you're looking at (and there appear to be four classes in the package):

This question and answer will also be helpful for addressing these kinds of questions in general in the future.

Community
  • 1
  • 1
Thomas
  • 43,637
  • 12
  • 109
  • 140
  • thank you. :) showMethods("summary") Function: summary (package base) object="ANY" object="ConfirmatoryClass" object="diagonalMatrix" object="ExploratoryClass" object="MixedClass" object="mle" object="MultipleGroupClass" object="sparseMatrix" suppose my object is from Confirmatory class. Now can you please tell me. how can I see the code for "summary" function –  Aug 21 '14 at 09:54
  • @user3755708 This depends on the class of the object you're trying to summarize. If `x` is the object you're trying to summarize (i.e., with `summary(x)`), what is the value you get from `class(x)`? – Thomas Aug 21 '14 at 09:56
  • I will make it simpler. In "mirt" package I was running following commands R> library("mirt") R> data <- expand.table(LSAT7) R> (mod1 <- mirt(data, 1)) R> summary(mod1) Now can you please tell me how can I get the code for summary here in this particular case. –  Aug 21 '14 at 10:01
  • @user3755708 That doesn't really help, but see my edits. – Thomas Aug 21 '14 at 10:01