Re: [R] Interpreting fa.diagram from package psych

2022-09-11 Thread David Winsemius



On 9/11/22 07:17, Ebert,Timothy Aaron wrote:

It is a bad graphic as the legend that should explain the color coding is 
missing. The next option is to copy the data and code and see if you can 
reproduce the figure. You can then play with the code and read a bit about the 
procedures to figure out what is going on. It should not be too hard. My guess 
is that there is some additional variable with three states that is being used. 
If this were the iris data set I would guess it was the three species: setosa, 
versicolor, and virginica.


Pretty sure that guess is incorrect.

I'm not sure there should be a legend. The colors just indicate group 
membership derived from a mathematical process that has attempted to 
separate case into distinct groups that maximize the correlations within 
individual groupings. And therefore maximizes the distance separating 
the groups. The number of groups is specified in the function call. You 
should go to the earlier results and see if you can construct the 
groupings to maximize internal correlations. Psychometricians do this 
when they don't really have a theoretical basis for doing classification 
and are asking the data do it for them. If they are doing this on a 
questionnaire dataset, they often go back to the specific 
questions/answer pairings within groupings and try to assign meaning to 
them.  They then build post-hoc explanations and often do further 
studies to see if they can replicate the results and achieve some sort 
of stable synthetic construct.  It's a rather theory-free strategy and 
so trying to assign labels automatically would be difficult.


--

David


Tim

-Original Message-
From: R-help  On Behalf Of Luigi Marongiu
Sent: Sunday, September 11, 2022 3:02 AM
To: David Winsemius 
Cc: r-help 
Subject: Re: [R] Interpreting fa.diagram from package psych

[External Email]

Sorry, the file was automatically downloaded and opened with the browser 
instead of pointing to the webpage.
Here is a better link:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcran.r-project.org%2Fweb%2Fpackages%2FpsychTools%2Fvignettes%2Ffactor.pdf&data=05%7C01%7Ctebert%40ufl.edu%7C9d0e49ff1aab4d5db2d308da93c3ac01%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637984765998607455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2OxukCvxcx9xFJQiAInt2ulqC23qiBjQRPU128O%2Bjn8%3D&reserved=0
The figure is on page 22.
The question is: The dots have different colors; how do I know what they 
represent?
Is there a way to show an auto-legend?
Thank you

On Sat, Sep 10, 2022 at 11:33 PM David Winsemius  wrote:


On 9/10/22 14:08, Luigi Marongiu wrote:

Hello,
I have plotted data from exploratory factor analysis, and I got a
graph similar to FIGURE 11 (PAGE 36) of this link
file:///home/gigiux/Downloads/An_overview_of_the_psych_package.pdf

This appears to be a link you a file on your personal device rather
than an attachment.

How do I interpret the figure? In particular, how do I know what the
colors represent?
Thank you


--
Best regards,
Luigi

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu%7C9d0e49ff1aab4d5db2d308da93c3ac01%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637984765998607455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KfsnfNKp3klZMJcvvuPD4gqI6fffn95FkpaPm8KyEnA%3D&reserved=0
PLEASE do read the posting guide 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C9d0e49ff1aab4d5db2d308da93c3ac01%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637984765998607455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7CZst6A76lzHADI4iRNJ%2FVI2%2FMOGLCAVnTL8aRLNjVA%3D&reserved=0
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] inadequacy in as.integer....

2022-09-11 Thread akshay kulkarni
Dear Tim,
  I am using the result of cumsum(), which has leading zeroes, 
(like 0 0 1 1 2 2), coerce it to a character vector, collapse it, and then 
coerce it back to an integer to compare it in a switch statement. But now I got 
it. I can just use the collapsed character value...THanks anyways...

Yours sincerely,
AKSHAY M KULKARNI


From: Ebert,Timothy Aaron 
Sent: Monday, September 12, 2022 12:30 AM
To: akshay kulkarni ; R help Mailing list 

Subject: RE: inadequacy in as.integer


Can you tell us why you want to do this? Is there something special about 09098 
versus 9098 or 009098? In any mathematical operation these are all the same 
number.



Tim



From: akshay kulkarni 
Sent: Sunday, September 11, 2022 2:58 PM
To: Ebert,Timothy Aaron ; R help Mailing list 

Subject: Re: inadequacy in as.integer



[External Email]

Dear Tim,

  So there is no way to coerce "09098" to 09098?



Yours sincerely,

AKSHAY M KULKARNI



From: Ebert,Timothy Aaron mailto:teb...@ufl.edu>>
Sent: Monday, September 12, 2022 12:07 AM
To: akshay kulkarni mailto:akshay...@hotmail.com>>; R 
help Mailing list mailto:r-help@r-project.org>>
Subject: RE: inadequacy in as.integer



Keep as character.

Tim

-Original Message-
From: R-help 
mailto:r-help-boun...@r-project.org>> On Behalf 
Of akshay kulkarni
Sent: Sunday, September 11, 2022 12:22 PM
To: R help Mailing list mailto:r-help@r-project.org>>
Subject: [R] inadequacy in as.integer

[External Email]

Dear members,
 I came across this queer thing during my analysis:
> as.integer("09098")


Any idea on how to retain the "0"?

Yours sincerely,
AKSHAY M KULKARNI

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To 
UNSUBSCRIBE and more, see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu%7C70a6ae074d1e42c17e9108da9411d934%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637985101625267716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FV4NoU8j%2F9KIYX5ExaY93fwQf%2FPqx1kisbt87Mj9%2F7Q%3D&reserved=0
PLEASE do read the posting guide 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C70a6ae074d1e42c17e9108da9411d934%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637985101625267716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BA0o8oGcR%2FFBX9Vth5DuitlZnTGG7rNDmFga3ixZ9j4%3D&reserved=0
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] inadequacy in as.integer....

2022-09-11 Thread Ebert,Timothy Aaron
Can you tell us why you want to do this? Is there something special about 09098 
versus 9098 or 009098? In any mathematical operation these are all the same 
number.

Tim

From: akshay kulkarni 
Sent: Sunday, September 11, 2022 2:58 PM
To: Ebert,Timothy Aaron ; R help Mailing list 

Subject: Re: inadequacy in as.integer

[External Email]
Dear Tim,
  So there is no way to coerce "09098" to 09098?

Yours sincerely,
AKSHAY M KULKARNI

From: Ebert,Timothy Aaron mailto:teb...@ufl.edu>>
Sent: Monday, September 12, 2022 12:07 AM
To: akshay kulkarni mailto:akshay...@hotmail.com>>; R 
help Mailing list mailto:r-help@r-project.org>>
Subject: RE: inadequacy in as.integer

Keep as character.

Tim

-Original Message-
From: R-help 
mailto:r-help-boun...@r-project.org>> On Behalf 
Of akshay kulkarni
Sent: Sunday, September 11, 2022 12:22 PM
To: R help Mailing list mailto:r-help@r-project.org>>
Subject: [R] inadequacy in as.integer

[External Email]

Dear members,
 I came across this queer thing during my analysis:
> as.integer("09098")
9098

Any idea on how to retain the "0"?

Yours sincerely,
AKSHAY M KULKARNI

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To 
UNSUBSCRIBE and more, see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu%7C70a6ae074d1e42c17e9108da9411d934%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637985101625267716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FV4NoU8j%2F9KIYX5ExaY93fwQf%2FPqx1kisbt87Mj9%2F7Q%3D&reserved=0
PLEASE do read the posting guide 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C70a6ae074d1e42c17e9108da9411d934%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637985101625267716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BA0o8oGcR%2FFBX9Vth5DuitlZnTGG7rNDmFga3ixZ9j4%3D&reserved=0
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] inadequacy in as.integer....

2022-09-11 Thread Bert Gunter
You seem to be confusing **what** is printed with *how* it is printed.

> print(9) ## a numeric (not an integer, actually. That would be 9L)
[1] 9   ## default print format
> print(formatC(9, width =2, flag = "0")) ## format specification
[1] "09"
> print(formatC(9, width =2, flag = "0"), quote = FALSE) # don't show quotes
[1] 09

See ?formatC and ?print.default for details

-- Bert

On Sun, Sep 11, 2022 at 9:22 AM akshay kulkarni  wrote:
>
> Dear members,
>  I came across this queer thing during my 
> analysis:
> > as.integer("09098")
> 9098
>
> Any idea on how to retain the "0"?
>
> Yours sincerely,
> AKSHAY M KULKARNI
>
> [[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] inadequacy in as.integer....

2022-09-11 Thread Andrew Simmons
What you're asking for doesn't make sense: 9098 and 09098 are the same

9098L == 09098L

If you mean specifically while printing, you could use sprintf:

cat(sprintf("%05d", 9098))

On Sun., Sep. 11, 2022, 14:58 akshay kulkarni, 
wrote:

> Dear Tim,
>   So there is no way to coerce "09098" to 09098?
>
> Yours sincerely,
> AKSHAY M KULKARNI
> 
> From: Ebert,Timothy Aaron 
> Sent: Monday, September 12, 2022 12:07 AM
> To: akshay kulkarni ; R help Mailing list <
> r-help@r-project.org>
> Subject: RE: inadequacy in as.integer
>
> Keep as character.
>
> Tim
>
> -Original Message-
> From: R-help  On Behalf Of akshay kulkarni
> Sent: Sunday, September 11, 2022 12:22 PM
> To: R help Mailing list 
> Subject: [R] inadequacy in as.integer
>
> [External Email]
>
> Dear members,
>  I came across this queer thing during my
> analysis:
> > as.integer("09098")
>
>
> Any idea on how to retain the "0"?
>
> Yours sincerely,
> AKSHAY M KULKARNI
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu%7C70a6ae074d1e42c17e9108da9411d934%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637985101625267716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2FV4NoU8j%2F9KIYX5ExaY93fwQf%2FPqx1kisbt87Mj9%2F7Q%3D&reserved=0
> PLEASE do read the posting guide
> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C70a6ae074d1e42c17e9108da9411d934%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637985101625267716%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BA0o8oGcR%2FFBX9Vth5DuitlZnTGG7rNDmFga3ixZ9j4%3D&reserved=0
> 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.
>

[[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] inadequacy in as.integer....

2022-09-11 Thread JRG via R-help
On 9/11/22 12:22, akshay kulkarni wrote:
> Dear members,
> I came across this queer thing during my analysis:
>> as.integer("09098")
> 9098
>
> Any idea on how to retain the "0"?

Don't use as.integer(), which has performed precisely the service that
it advertises?


I certainly wouldn't call this an 'inadequacy'.


And please stop posting in html.


---JRG



> Yours sincerely,
> AKSHAY M KULKARNI
>
> [[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] Interpreting fa.diagram from package psych

2022-09-11 Thread Ebert,Timothy Aaron
It is a bad graphic as the legend that should explain the color coding is 
missing. The next option is to copy the data and code and see if you can 
reproduce the figure. You can then play with the code and read a bit about the 
procedures to figure out what is going on. It should not be too hard. My guess 
is that there is some additional variable with three states that is being used. 
If this were the iris data set I would guess it was the three species: setosa, 
versicolor, and virginica.

Tim

-Original Message-
From: R-help  On Behalf Of Luigi Marongiu
Sent: Sunday, September 11, 2022 3:02 AM
To: David Winsemius 
Cc: r-help 
Subject: Re: [R] Interpreting fa.diagram from package psych

[External Email]

Sorry, the file was automatically downloaded and opened with the browser 
instead of pointing to the webpage.
Here is a better link:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcran.r-project.org%2Fweb%2Fpackages%2FpsychTools%2Fvignettes%2Ffactor.pdf&data=05%7C01%7Ctebert%40ufl.edu%7C9d0e49ff1aab4d5db2d308da93c3ac01%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637984765998607455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2OxukCvxcx9xFJQiAInt2ulqC23qiBjQRPU128O%2Bjn8%3D&reserved=0
The figure is on page 22.
The question is: The dots have different colors; how do I know what they 
represent?
Is there a way to show an auto-legend?
Thank you

On Sat, Sep 10, 2022 at 11:33 PM David Winsemius  wrote:
>
>
> On 9/10/22 14:08, Luigi Marongiu wrote:
> > Hello,
> > I have plotted data from exploratory factor analysis, and I got a 
> > graph similar to FIGURE 11 (PAGE 36) of this link 
> > file:///home/gigiux/Downloads/An_overview_of_the_psych_package.pdf
> This appears to be a link you a file on your personal device rather 
> than an attachment.
> > How do I interpret the figure? In particular, how do I know what the 
> > colors represent?
> > Thank you
>


--
Best regards,
Luigi

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C01%7Ctebert%40ufl.edu%7C9d0e49ff1aab4d5db2d308da93c3ac01%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637984765998607455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KfsnfNKp3klZMJcvvuPD4gqI6fffn95FkpaPm8KyEnA%3D&reserved=0
PLEASE do read the posting guide 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C01%7Ctebert%40ufl.edu%7C9d0e49ff1aab4d5db2d308da93c3ac01%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C637984765998607455%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7CZst6A76lzHADI4iRNJ%2FVI2%2FMOGLCAVnTL8aRLNjVA%3D&reserved=0
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] Interpreting fa.diagram from package psych

2022-09-11 Thread Luigi Marongiu
Sorry, the file was automatically downloaded and opened with the
browser instead of pointing to the webpage.
Here is a better link:
https://cran.r-project.org/web/packages/psychTools/vignettes/factor.pdf
The figure is on page 22.
The question is: The dots have different colors; how do I know what
they represent?
Is there a way to show an auto-legend?
Thank you

On Sat, Sep 10, 2022 at 11:33 PM David Winsemius  wrote:
>
>
> On 9/10/22 14:08, Luigi Marongiu wrote:
> > Hello,
> > I have plotted data from exploratory factor analysis, and I got a
> > graph similar to FIGURE 11 (PAGE 36) of this link
> > file:///home/gigiux/Downloads/An_overview_of_the_psych_package.pdf
> This appears to be a link you a file on your personal device rather than
> an attachment.
> > How do I interpret the figure? In particular, how do I know what the
> > colors represent?
> > Thank you
>


-- 
Best regards,
Luigi

__
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.