Error with "center" function

Hi,
I've got a question about a homework:

Unfortunately it is not possible to install the package center
install.packages("center").

My R Studio Version is: R 4.2.1

The task is: c) Calculate the model (maximum likelihood estimation). Specify the
average intercept (γ00), the average slope for the centered variable.
SES_CWC (γ10), the variance of the random intercept (τ00), the variance of the random slope (τ11)
and the variance of the level-1 residuals (σ2)..

The error is:

"Warning in install.packages :
package ‘center’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
R Installation and Administration"

With R Installation and Administration I couldn´t find any help.

Is there another function for center I can use instead?

Appreciate every help.

Many thanx.

You are mixing up packages and functions. The error indicates, that there is no center package on CRAN available. But what you want is a function called center() I guess. I don't know what your homework instructions say besides the instructions you gave, but you can center your data with the base R function scale().

Kind regards

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.