SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 18, 2021 09:07 AM

    Hi,

    I have tried to use initial cluster centers from hierarchical clustering (an external file) when doing k-means analysis. However, I always reiceive an error message. Although I do use the correct format "cluster_" I still get an error message when I read in the external file saying "The file referenced on the FILE subcommand does not contain initial cluster centers for at least one of the variables being analyzed." I am not sure how to proceed as all of my variables do contain cluster centers. Do you know what I can do to make it work?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 18, 2021 12:52 PM

    I can't guess what is wrong with your centers file, but I suggest running a k-means procedure and saving the centers file from it. Compare that with what you are using as input to see if you can spot the difference in the variable dictionaries.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 3.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 14, 2024 11:12 AM

    Hello, I meet the same case. I want read in the initial cluster center, but the file is the wrong foamat. Could you tell me the right file format?



    ------------------------------
    卫民 沈
    ------------------------------



  • 4.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 14, 2024 12:45 PM
    As I suggested before, save the cluster centers from the procedure and look at the resulting sav file.

    From the CSR:
    Use FILE to obtain initial cluster centers from an external IBM SPSS Statistics data file or currently open
    dataset. (DATASET DECLARE command).
    • The only specifications are the quoted file specification or dataset name and the numeric cluster ID
    variable.

    --





  • 5.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 18, 2021 02:25 PM

    Hi Jon, thank you for your response! I have actually tried that and discovered no difference. I also tried using other data, another laptop, even the spss subscription just to see if I can get it to work but nothing helped. I wonder if it is an spss bug and just does not work. Or does it work when you try it? Then it is just me.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 6.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 18, 2021 02:38 PM

    I have used this successfully many times. If you want to send me the data or a sample of it, the centers file, and the syntax, I'll take a look. (jkpeckSupport Member)






    #SPSSStatistics
    #Support
    #SupportMigration


  • 7.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 18, 2021 05:07 PM

    Jon, thank you soo much! I have just sent you an email and hope you received it and all the files. I am curious to know what you can find out.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 8.  RE: how to read in an external file into quick cluster (k-means) analysis in order to use initial cluster centers?

    Posted Tue May 14, 2024 11:12 AM

    Hello, I meet the same case. If you had solved it, can you give me some advise?



    ------------------------------
    卫民 沈
    ------------------------------