Monday, September 30, 2024

IMPORTANCE OF STATISTICAL TOOLS IN EDUCATIONAL POLICY RESEARCH

IMPORTANCE OF STATISTICAL TOOLS IN EDUCATIONAL POLICY RESEARCH
DR. DEBDULAL DUTTA ROY,PH.D.
RETD. HEAD AND ASSOCIATE PROFESSOR
PRESIDENT, RPRIT

Deeply grateful to 
Prof. Panch. Ramalingam Director (i/c), UGC – MMTTC

Organized by 
 Pondicherry University 
Pondicherry University UGC- Malaviya Mission Teacher Training Centre (UGC-MMTTC) Online NEP – Orientation and Sensitization Programm

Importance of Statistical tools in Educational policy research.
1. Data-Driven Decision Making
Statistical tools allow policymakers to make informed decisions based on empirical data. By analyzing trends, test scores, student demographics, and other variables, researchers can provide insights into which policies improve educational outcomes and which need adjustment.
2. Measuring Program Effectiveness
Educational policies, such as changes in curriculum, funding, or teaching methods, need to be evaluated for their effectiveness. Tools like t-tests, ANOVA, and regression analysis help in comparing pre- and post-policy data, revealing the impact of new initiatives.
3. Identifying Trends and Patterns
Descriptive statistics and visualization tools enable researchers to spot long-term trends in education, such as shifts in student achievement, attendance, or access to resources. This helps policymakers understand evolving needs and challenges.
4. Handling Large-Scale Data
Educational policy often involves working with large datasets, such as national assessments or student performance data over several years. Statistical tools like factor analysis, clustering, and multivariate regression help in simplifying complex data while retaining essential information for policy decisions.
5. Addressing Inequality
Statistical tools are invaluable in identifying disparities in education across different socio-economic, gender, or geographic groups. For example, multilevel modeling can assess how factors at different levels (e.g., individual, school, district) influence educational outcomes, aiding in the development of targeted policies to reduce inequality.
6. Predictive Analysis
Predictive models, such as machine learning algorithms, are increasingly being used to forecast future educational trends, helping policymakers plan ahead. These models predict potential issues like dropout rates or the success of certain teaching methodologies.


7. Validating Research Findings
In educational research, statistical tools help ensure that findings are not due to chance. Tools like confidence intervals and hypothesis testing provide validity and reliability to the conclusions drawn, making research outcomes more robust for policy adoption.
8. Policy Simulation
Some statistical models allow for simulations, where policymakers can experiment with different variables to see how changes might affect outcomes. This is useful in forecasting the potential impact of policies before actual implementation.
9. Assessing Psychometric Data
In educational assessments and testing, psychometric methods, including item response theory (IRT) and factor analysis, are used to develop and validate aptitude tests, performance evaluations, and student feedback mechanisms, ensuring that educational policies are based on sound evaluation tools.

Univariate statistical tools
Univariate statistical tools refer to techniques used for analyzing and describing a single variable or dataset. These tools focus on summarizing the distribution, central tendency, and variability of the data for one variable at a time, without considering relationships with other variables.
Key Characteristics of Univariate Statistical Tools:
Single Variable Focus: These tools analyze one variable, ignoring any interaction or dependence on other variables.
Descriptive Analysis: They provide summary statistics such as mean, median, mode, variance, and standard deviation to describe the characteristics of the data.
Distribution Assessment: Tools like histograms and frequency distributions help visualize how data points are spread across the range of the variable.
 

Frequency Distribution: Shows how often each value occurs, used for analyzing the distribution of student performance, enrollment rates, or resource allocation.
Mean (Arithmetic Average): Sum of all values divided by the number of values, used to assess average test scores, attendance rates, or teacher salaries.
Median:The middle value in an ordered data set, helps understand the central tendency in student performance or budget allocations.
Mode: The most frequent value in the data, useful for identifying the most common grade level or student-teacher ratio.
Range: The difference between the highest and lowest values, allows evaluation of disparities in school funding, teacher salaries, or student achievement.
Variance: Measures how much values differ from the mean, providing insight into variability in test scores or resource distribution.
Standard Deviation: The square root of variance, used to measure variation in student outcomes or financial investment across educational programs.
Percentiles: Indicates the value below which a certain percentage of data falls, used to rank students or schools in terms of performance or funding.
Quartiles:Divides the data into four equal parts, useful for analyzing distributions of scores or budgets.
Skewness: Describes the asymmetry of data distribution, useful for understanding student enrollment, drop-out rates, or test scores.
Kurtosis: Describes the peakedness or flatness of data, used to evaluate how outliers affect educational data such as performance ratings.
Proportion: The ratio of a part to the whole, used to measure the proportion of students passing exams or receiving financial aid.
Confidence Intervals: Provides a range within which a population parameter is expected to fall, useful for estimating potential outcomes for student performance or policy impacts.


Bivariate statistical tools 

Bivariate statistical tools are techniques used to analyze the relationship between two variables. These tools help researchers explore how one variable changes in relation to another, providing insights into potential correlations, associations, or dependencies.
Key Characteristics of Bivariate Statistical Tools:
Two-Variable Focus: These tools analyze the relationship between two variables, often denoted as XXX (independent variable) and YYY (dependent variable).
Relationship Analysis: Bivariate tools examine whether and how strongly two variables are associated. The association can be positive, negative, or neutral (no association).
Comparison and Correlation: These methods focus on comparing two variables to understand their strength, direction, and nature of association

Correlation Coefficient (Pearson's r): Measures the strength and direction of the linear relationship between two variables (e.g., student-teacher ratio and student performance).
Spearman’s Rank Correlation: A non-parametric measure of rank correlation, used when data do not meet the assumptions of Pearson's correlation (e.g., ranking schools based on performance and funding).
Chi-Square Test of Independence:Examines whether two categorical variables are independent of each other (e.g., student gender and preference for specific subjects).
T-Test for Two Independent Samples: Compares the means of two independent groups to see if there is a statistically significant difference (e.g., comparing test scores between public and private school students).
Paired Samples T-Test: Compares the means of two related groups (e.g., comparing student test scores before and after implementing a new teaching method).
ANOVA (Two-Way Analysis of Variance): Assesses the effect of two categorical independent variables on a continuous dependent variable (e.g., examining the effect of school location and teaching method on student performance).
Regression Analysis: Explores the relationship between an independent variable and a dependent variable (e.g., predicting student performance based on hours of study and parental income).
Logistic Regression: Used when the dependent variable is categorical (e.g., predicting whether a student will graduate based on factors like attendance and grades).
Crosstabulation (Contingency Tables): Displays the frequency distribution of variables to observe relationships (e.g., cross-tabulating school type with student outcomes).
Covariance:Measures how much two variables vary together, used to understand relationships in financial or academic performance data (e.g., school funding and student success rates).


Multivariate statistical tools 

Multivariate statistical tools are techniques used to analyze more than two variables simultaneously. These tools help researchers explore complex relationships, interactions, and patterns in data where multiple variables may be influencing each other. They are particularly useful in fields like social sciences, psychology, and economics, where understanding the interactions between many factors is crucial.
Key Characteristics of Multivariate Statistical Tools:
Multiple Variables: Multivariate tools involve the analysis of three or more variables, often to explore how they interact or influence each other.
Complex Relationships: These tools can detect interactions between variables that may not be evident in bivariate or univariate analysis.
Dimensionality Reduction: Multivariate techniques often reduce the complexity of the data by identifying key underlying dimensions or factors.
Predictive Modeling: These tools are used for predicting outcomes based on multiple independent variables, offering more accurate and nuanced predictions than bivariate approaches.
Multiple Regression Analysis: Examines the relationship between one dependent variable and two or more independent variables (e.g., predicting student performance based on socioeconomic status, teacher quality, and school resources).
Multivariate Analysis of Variance (MANOVA): Tests for differences in multiple dependent variables across different groups (e.g., analyzing the impact of school type and teaching methods on student performance and well-being).
Factor Analysis:Identifies underlying relationships between multiple variables by grouping them into factors (e.g., understanding the factors influencing student motivation, such as teacher support, school climate, and parental involvement).
Principal Component Analysis (PCA): Reduces the dimensionality of large datasets while preserving as much variability as possible (e.g., simplifying complex data on student performance across multiple subjects and demographics).
Cluster Analysis: Groups individuals or cases into clusters based on similarities across multiple variables (e.g., grouping schools with similar student outcomes, teaching methods, and resources).
Discriminant Analysis: Predicts group membership for a categorical dependent variable based on several independent variables (e.g., identifying factors that predict whether a student is likely to drop out or graduate).
Structural Equation Modeling (SEM): Tests complex relationships between multiple variables, including both direct and indirect effects (e.g., examining how school leadership, teaching practices, and parental involvement collectively influence student achievement).
Canonical Correlation Analysis:Assesses the relationship between two sets of variables (e.g., analyzing the relationship between student academic performance and extracurricular participation).
Hierarchical Linear Modeling (HLM): Analyzes data with nested structures, such as students within schools (e.g., understanding how both individual-level and school-level factors affect student achievement).
Multivariate Logistic Regression: Used when the dependent variable is categorical, analyzing how multiple independent variables influence outcomes (e.g., predicting whether students pass or fail based on socioeconomic status, school attendance, and study habits).



Monday, September 23, 2024

cluster analysis

**Cluster Analysis: A Comprehensive Exploration of its Principles and Applications**

**Introduction**

Cluster analysis, also known as clustering, is a powerful and widely used statistical technique in data science, machine learning, and various research disciplines. It involves grouping data points or objects into clusters based on their similarity. The primary goal of clustering is to ensure that objects within the same cluster are more similar to each other than to those in other clusters. This unsupervised learning method plays a critical role in pattern recognition, data mining, image segmentation, and market segmentation, among other applications. Unlike supervised learning, where data is labeled, clustering does not rely on predefined labels or classes, making it a versatile tool for exploratory data analysis and knowledge discovery.

In this essay, we will explore the foundational principles of cluster analysis, discuss the different types of clustering methods, and delve into practical applications across various fields. Additionally, we will examine the challenges and limitations associated with cluster analysis, along with the recent advancements that are enhancing its efficacy and scope.

### **Foundations of Cluster Analysis**

The central concept of cluster analysis is the identification of natural groupings within a dataset. In essence, it aims to minimize intra-cluster variance (the similarity among data points within the same cluster) and maximize inter-cluster variance (the difference between clusters). To achieve this, several key components need to be understood: the distance or similarity measure, the clustering algorithm, and the linkage criteria.

#### **1. Distance or Similarity Measures**

Clustering relies on the idea of measuring the similarity or dissimilarity between data points. This is often done through distance metrics, such as Euclidean distance, Manhattan distance, or correlation-based distances. The choice of a distance metric depends on the nature of the data and the desired outcome. For instance, Euclidean distance is commonly used in spatial data, while correlation-based measures may be more appropriate in time-series data or financial datasets.

#### **2. Clustering Algorithms**

There are several clustering algorithms, each with its advantages and disadvantages. The most common clustering techniques are:

- **Partitioning Methods**: These methods divide the data into a predefined number of clusters. K-means clustering is the most widely used partitioning method, where the algorithm iteratively assigns each data point to the nearest centroid, recalculating the centroids until convergence. Other partitioning methods include K-medoids and fuzzy c-means clustering.
  
- **Hierarchical Clustering**: This method creates a hierarchy of clusters, which can be represented as a tree-like structure called a dendrogram. Hierarchical clustering can be either agglomerative (bottom-up) or divisive (top-down). In agglomerative clustering, each data point starts as its own cluster, and clusters are merged based on similarity until a single cluster is formed. In divisive clustering, the process works in reverse, where all points start in one cluster and are split into smaller clusters.
  
- **Density-Based Methods**: These methods, such as DBSCAN (Density-Based Spatial Clustering of Applications with Noise), form clusters based on the density of data points in a region. They are particularly effective for identifying clusters of arbitrary shapes and handling noise in the data.
  
- **Model-Based Clustering**: This method assumes that the data is generated by a mixture of underlying probability distributions. Gaussian Mixture Models (GMM) are a popular model-based clustering technique, where the data is assumed to be generated from a mixture of Gaussian distributions with unknown parameters.
  
- **Grid-Based Methods**: These methods, such as STING (Statistical Information Grid), partition the data space into a grid structure and cluster the grid cells based on their densities. This method is efficient for large datasets and works well with multidimensional data.

#### **3. Linkage Criteria**

For hierarchical clustering, linkage criteria are essential to determine how clusters are merged or split. Common linkage methods include:

- **Single Linkage**: The distance between two clusters is defined by the smallest distance between any pair of points in the two clusters.
- **Complete Linkage**: The distance between two clusters is defined by the largest distance between any pair of points.
- **Average Linkage**: The distance between two clusters is the average of all pairwise distances between points in the two clusters.
- **Ward’s Method**: This method aims to minimize the variance within clusters when merging them. It is widely used because it tends to create compact and spherical clusters.

### **Types of Clustering**

Cluster analysis can be categorized into two main types: **hard clustering** and **soft clustering**.

- **Hard Clustering**: In hard clustering, each data point is assigned to a single cluster. K-means and hierarchical clustering are examples of hard clustering methods. Hard clustering assumes that each data point belongs entirely to one cluster, which may not always reflect the true nature of the data.
  
- **Soft Clustering**: Also known as fuzzy clustering, this method allows data points to belong to multiple clusters with varying degrees of membership. Fuzzy c-means is a common soft clustering method, where each data point is assigned a membership value that indicates its degree of belonging to each cluster. Soft clustering is useful when the boundaries between clusters are not well-defined, as is often the case in real-world datasets.

### **Applications of Cluster Analysis**

Cluster analysis has a wide range of applications across various fields, including biology, marketing, finance, and social sciences. Below are some prominent examples of how clustering is used in practice.

#### **1. Biology and Bioinformatics**

In biology, cluster analysis is used to group genes, proteins, or organisms based on their similarities. For example, in gene expression analysis, hierarchical clustering can be used to group genes with similar expression patterns across different experimental conditions. This helps identify groups of co-expressed genes that may be involved in the same biological processes. Clustering is also used in taxonomy to classify organisms into species, genera, or higher-level taxonomic categories based on their genetic or morphological similarities.

#### **2. Market Segmentation**

In marketing, cluster analysis is used to segment customers into distinct groups based on their behaviors, preferences, or demographics. By identifying customer segments, businesses can tailor their marketing strategies to target specific groups more effectively. For instance, a company may use clustering to group customers based on their purchasing history and then design personalized promotions for each segment.

#### **3. Image Segmentation**

In computer vision, clustering is used for image segmentation, where an image is divided into segments or regions that correspond to different objects or areas. For example, K-means clustering can be applied to the pixel values of an image to segment it into regions of similar colors or textures. This technique is widely used in medical imaging, where it helps identify tumors or other structures in MRI or CT scans.

#### **4. Social Network Analysis**

Cluster analysis is also applied in social network analysis to identify communities or groups of individuals who are more closely connected to each other than to the rest of the network. For example, hierarchical clustering can be used to group users of a social media platform based on their interaction patterns, revealing communities of users who frequently communicate with each other. This information can be used to understand the structure of the network and identify influential individuals within communities.

#### **5. Financial Analysis**

In finance, clustering is used to group stocks or financial assets based on their performance or risk characteristics. For example, hierarchical clustering can be applied to stock returns data to identify groups of stocks that exhibit similar price movements. This information can help investors diversify their portfolios by selecting assets from different clusters that are less correlated with each other. Clustering is also used in risk management to group financial instruments based on their risk profiles, helping banks and financial institutions monitor and manage their exposure to different types of risks.

### **Challenges and Limitations of Cluster Analysis**

Despite its wide range of applications, cluster analysis is not without its challenges and limitations. Several issues can arise when applying clustering methods to real-world data.

#### **1. Determining the Optimal Number of Clusters**

One of the most significant challenges in cluster analysis is determining the optimal number of clusters. Many clustering algorithms, such as K-means, require the number of clusters to be specified in advance. However, the true number of clusters is often unknown, and selecting the wrong number can lead to misleading results. Several techniques have been developed to address this issue, such as the Elbow method, Silhouette analysis, and the Gap statistic, but they are not foolproof and may not always provide a clear answer.

#### **2. Sensitivity to Initial Conditions**

Some clustering algorithms, such as K-means, are sensitive to the initial placement of cluster centroids. Different initializations can lead to different final clusters, and the algorithm may converge to a local optimum rather than the global optimum. To mitigate this issue, multiple runs with different initializations are often performed, and the best result is selected based on a chosen criterion.

#### **3. High-Dimensional Data**

Clustering high-dimensional data can be challenging due to the "curse of dimensionality." As the number of dimensions increases, the distance between data points becomes less informative, and it becomes harder to distinguish between clusters. Dimensionality reduction techniques, such as Principal Component Analysis (PCA) or t-SNE (t-Distributed Stochastic Neighbor Embedding), are often applied before clustering to reduce the number of dimensions while preserving the structure of the data.

#### **4. Scalability**

Clustering large datasets can be computationally expensive, especially for algorithms with high time complexity, such as hierarchical clustering. For large-scale datasets, more scalable clustering algorithms, such as Mini-batch K-means or parallelized versions of DBSCAN, may be necessary to handle the computational burden.

#### **5. Handling Noise and Outliers**

Real-world datasets often contain noise and outliers, which can significantly affect the quality of clustering. Some clustering algorithms, such as DBSCAN, are robust to noise and can identify outliers as points that do not belong to any cluster. However, other algorithms, such as K-means, are

Hierarchical clustering

Hierarchical clustering is a method of cluster analysis in machine learning that builds a hierarchy of clusters. It can be classified into two main types:

1. **Agglomerative Hierarchical Clustering** (bottom-up approach): 
   - Starts with each data point as its own cluster.
   - Pairs of clusters are merged step-by-step based on a similarity metric (like Euclidean distance or correlation) until all points belong to a single cluster or a stopping criterion is reached.
   - A **dendrogram** is used to represent the hierarchy, where each merge represents a point in the tree.

2. **Divisive Hierarchical Clustering** (top-down approach):
   - Starts with all data points in a single cluster.
   - The cluster is recursively split until each point is in its own cluster, or a predefined stopping condition is met.

### Key Steps:
- **Distance Matrix Calculation**: A matrix of pairwise distances between data points is computed.
- **Linkage Criteria**: Determines how distances between clusters are calculated. Common methods include:
   - **Single Linkage**: Distance between the closest pair of points in two clusters.
   - **Complete Linkage**: Distance between the farthest pair of points.
   - **Average Linkage**: Average distance between points in the clusters.

### Pros and Cons:
- **Advantages**:
  - Does not require the number of clusters to be specified in advance.
  - Works well for small datasets and can reveal the underlying structure in data.
- **Disadvantages**:
  - Computationally expensive for large datasets (O(n²) time complexity).
  - Sensitive to noise and outliers.

Hierarchical clustering is commonly used in bioinformatics, market segmentation, and social network analysis where the relationship between data points is more complex.
------
Here’s an example of performing **Hierarchical Clustering** using **base R**, including how to visualize the results with a dendrogram:

### 1. **Step-by-Step Example**: 

We'll use the `iris` dataset, which is included in R.

#### Step 1: Load the dataset
```r
# Load the iris dataset
data(iris)
# Remove the species column for clustering
iris_data <- iris[, -5]
```

#### Step 2: Compute the distance matrix
We compute the Euclidean distance between data points.
```r
# Compute Euclidean distance
dist_matrix <- dist(iris_data, method = "euclidean")
```

#### Step 3: Perform Hierarchical Clustering
Use the `hclust()` function to apply agglomerative hierarchical clustering.
```r
# Perform hierarchical clustering using complete linkage
hclust_result <- hclust(dist_matrix, method = "complete")
```

#### Step 4: Plot the Dendrogram
A dendrogram is a tree-like diagram showing the hierarchy of clusters.
```r
# Plot the dendrogram
plot(hclust_result, main = "Dendrogram of Iris Data", xlab = "", sub = "")
```

#### Step 5: Cut the Tree to Form Clusters
To form a specific number of clusters (e.g., 3), you can cut the dendrogram:
```r
# Cut tree into 3 clusters
clusters <- cutree(hclust_result, k = 3)
# Add the cluster assignments to the dataset
iris$Cluster <- clusters
head(iris)
```

### 2. **Explanation of Output**:
- The dendrogram plot shows the hierarchical structure of the clusters. You can decide the number of clusters by cutting the tree at a desired height.
- The `cutree()` function assigns cluster labels to each observation based on the number of clusters you specify.

### 3. **Interpretation**:
- By visualizing the dendrogram, you can explore how data points are grouped together.
- By cutting the tree at a specific height, we can decide how many clusters we want and assign each data point to a cluster accordingly.

This method uses **complete linkage**, but you can change it to other types of linkage, such as `single`, `average`, or `ward.D2`.

Tuesday, September 3, 2024

Data Mining: A paradigm shift in research

Data mining, the process of discovering patterns and insights from large datasets, has revolutionized the way we approach data analysis. This paradigm shift has transformed the way organizations operate, make decisions, and drive innovation.


Traditionally, data analysis was a manual, time-consuming process focused on hypothesis testing and confirmatory research. However, with the exponential growth of data, this approach became obsolete. Data mining emerged as a response to this challenge, enabling organizations to uncover hidden patterns, relationships, and insights from vast amounts of data.

Key words 

Analysis and Analytics : Analysis results in insights about what happened and why. Analytics aims to provide actionable insights that guide future decisions and strategies.

Data-information-knowledge

Data refers to raw, unorganized facts and figures that lack context or meaning on their own. It is the basic building block of information and knowledge, consisting of observations, measurements, and descriptions.

Characteristics:

Unprocessed and unstructured.

Lacks context, interpretation, or significance.

Can be qualitative (text, images) or quantitative (numbers, dates).

Examples:

A list of numbers (e.g., 23, 47, 89).

A collection of dates and times.

A set of customer names and addresses without any additional context.

Information

  • Definition: Information is data that has been processed, organized, or structured in a way that adds context, making it meaningful and useful. It answers questions like "who," "what," "where," and "when."
  • Characteristics:
    • Data that has been interpreted and given context.
    • More structured and easier to understand than raw data.
    • Helps in understanding specific details or aspects of a situation.
  • Examples:
    • A sales report showing revenue by month.
    • A table summarizing test scores by student.
    • A weather report that includes temperature, humidity, and wind speed.

3. Knowledge

  • Definition: Knowledge is the understanding, awareness, or insight gained from interpreting and analyzing information. It is built upon information and experience, allowing for informed decision-making, problem-solving, and prediction.
  • Characteristics:
    • Involves synthesis of information with experience, context, and intuition.
    • Provides deeper understanding and the ability to make informed decisions.
    • Often shared, accumulated, and refined over time.
  • Examples:
    • Knowing that an increase in sales during certain months correlates with specific marketing strategies.
    • Understanding customer behavior trends based on historical purchase data.
    • Expertise in troubleshooting a technical problem based on patterns observed in prior incidents.

Key Differences

AspectDataInformationKnowledge
NatureRaw facts and figuresProcessed data with contextInsights derived from information
ContextLacks contextContextualized and organizedIntegrated with experience and insight
PurposeBasis for informationAnswers specific questionsSupports decision-making and action
Example123, 456, “John”"John scored 456 on the test"Understanding why John performed well
UsefulnessMinimal on its ownUseful for specific tasksEnables informed decisions

In essence, data is the raw input, information is the organized and contextualized data, and knowledge is the valuable understanding that guides actions and decisions. This hierarchy shows how data is transformed into actionable insights that are crucial for effective decision-making.

The paradigm shift brought about by data mining is characterized by:


1. *From hypothesis-driven to data-driven*: Data mining flips the traditional approach on its head, allowing data to guide decision-making rather than preconceived notions.


2. *From manual to automated*: Advanced algorithms and machine learning techniques automate the discovery process, saving time and resources.


3. *From descriptive to predictive*: Data mining moves beyond descriptive statistics, enabling predictive analytics and foresight.


4. *From isolated to integrated*: Data mining combines data from diverse sources, fostering a holistic understanding of complex phenomena.


5. *From reactive to proactive*: Organizations can now anticipate trends, risks, and opportunities, rather than simply responding to them.


The impact of this paradigm shift is profound, transforming industries and creating new opportunities. Businesses can now:


- *Personalize customer experiences*

- *Optimize operations and supply chains*

- *Drive innovation and R&D*

- *Mitigate risks and fraud*

- *Inform policy and decision-making*


In conclusion, data mining has revolutionized the way we approach data analysis, enabling organizations to unlock insights, drive innovation, and make data-driven decisions. As data continues to grow, this paradigm shift will only continue to transform industries and societies.

_____________________________________________

Here's an example of data mining using the power plant data


*Problem:* Identify the characteristics of workers with high safety consciousness. 

*Approach:*

library(psych)

lowerCor(tatadata)

names(tatadatascale)

names(tatadatascale2)

model=kmeans(tatadatascale2,centers=3)

print(model)

ct=table(model$cluster)