How to get a Read-Write Reference to Parent GameObject from a script component attached to it?

I have a game object(object) with a script component(myscript) attached.

I have a reference to myscript component through getComponent, and I want to change the transform of the gameObject the script is attached to.

myscript.gameObject.transform = (new value);

The above code gives me error,

Property ‘UnityEngine.GameObject.transform’ is read only.

Is there a way to get a read-write version?

You can not change the transform component. You can change values on it. Change localPosition, localRotation, localScale, position, rotation and so on.