Re: [R] Out from an R package

2021-02-25 Thread John Fox

Dear Goran,

It's not clear from your question what you want to do, but my guess is 
that you simply what a "printout" of your results. The usual way to 
obtain that is via the summary() function. In your case summary(Output).


That's typical of statistical modeling functions in R: They return 
objects, which can be used for further computing, rather than directly 
producing printouts.


If my guess is correct, then you probably should learn more about 
statistical modeling in R, and about R in general, before using it in 
your work.


One more thing: I doubt whether the command

Output <- lmer(G10ln ~ v191_ms + (1 | couno), data = 'G10R')

actually works. The data argument should be a data frame, not the *name* 
of a data frame, i.e., data = G10R .


I hope this helps,
 John

John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
web: https://socialsciences.mcmaster.ca/jfox/


On 2021-02-25 10:24 a.m., Göran Djurfeldt wrote:

Help! I am going crazy for a very simple reason. I can’t access the output from 
for instance the lme4 package in R. I have been able to import an SPSS file 
into an R data frame. I have downloaded and installed the Lme4 package and I 
think I have also learnt how to produce a mixed model with lmer:

Output <- lmer(G10ln ~ v191_ms + (1 | couno), data = 'G10R')

How shall I define the output from lmer? What kind of object is it? How do I 
define it?

Goran

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] Out from an R package

2021-02-25 Thread Eric Berger
The str() function is your friend. Try
str(Output)


On Thu, Feb 25, 2021 at 12:09 PM David Winsemius 
wrote:

>
> On 2/25/21 7:24 AM, Göran Djurfeldt wrote:
> > Help! I am going crazy for a very simple reason. I can’t access the
> output from for instance the lme4 package in R. I have been able to import
> an SPSS file into an R data frame. I have downloaded and installed the Lme4
> package and I think I have also learnt how to produce a mixed model with
> lmer:
> >
> > Output <- lmer(G10ln ~ v191_ms + (1 | couno), data = 'G10R')
> >
> > How shall I define the output from lmer? What kind of object is it? How
> do I define it?
>
> I'm not sure what you mean by "How do I define" the output from a
> function. The function does the "definition", but you can correctly
> refer to the output of most regression functions as "a list". The best
> way to get the specific result from a function is to go to its help page
> and look at the Details and Values sections.
>
>
> --
>
> David.
>
> >
> > Goran
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] Out from an R package

2021-02-25 Thread David Winsemius



On 2/25/21 7:24 AM, Göran Djurfeldt wrote:

Help! I am going crazy for a very simple reason. I can’t access the output from 
for instance the lme4 package in R. I have been able to import an SPSS file 
into an R data frame. I have downloaded and installed the Lme4 package and I 
think I have also learnt how to produce a mixed model with lmer:

Output <- lmer(G10ln ~ v191_ms + (1 | couno), data = 'G10R')

How shall I define the output from lmer? What kind of object is it? How do I 
define it?


I'm not sure what you mean by "How do I define" the output from a 
function. The function does the "definition", but you can correctly 
refer to the output of most regression functions as "a list". The best 
way to get the specific result from a function is to go to its help page 
and look at the Details and Values sections.



--

David.



Goran

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


[R] Out from an R package

2021-02-25 Thread Göran Djurfeldt
Help! I am going crazy for a very simple reason. I can’t access the output from 
for instance the lme4 package in R. I have been able to import an SPSS file 
into an R data frame. I have downloaded and installed the Lme4 package and I 
think I have also learnt how to produce a mixed model with lmer:

Output <- lmer(G10ln ~ v191_ms + (1 | couno), data = 'G10R')

How shall I define the output from lmer? What kind of object is it? How do I 
define it?

Goran

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.