Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5840473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:45:02+00:00 2026-05-22T11:45:02+00:00

Here is an excerpt from Mixed Effects Models in S and S-Plus page 238

  • 0

Here is an excerpt from Mixed Effects Models in S and S-Plus page 238:


enter image description here
enter image description here


this is the code that I have used to recreate this example:

library(nlme)
spatDat <- data.frame(x = c(0,0.25,0.5,0.75,1), y = c(0,0.25,0.5,0.50,0.75))
cs1Exp <- corExp(1, form = ~x+y)
cs1Exp <- initialize(cs1Exp, spatDat)

but when I do so, I get this error:

Error in getClass(Class) : 
  c("\"corExp\" is not a defined class", "\"corSpatial\" is not a defined class", "\"corStruct\" is not a defined class")
In addition: Warning message:
In if (!is.na(match(Class, .BasicClasses))) return(newBasic(Class,  :
  the condition has length > 1 and only the first element will be used

Why do I get this error?


Appendix

R version 2.13.0 (2011-04-13)
Platform: x86_64-pc-linux-gnu (64-bit)
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] nlme_3.1-101

loaded via a namespace (and not attached):
[1] grid_2.13.0     lattice_0.19-26
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:45:03+00:00Added an answer on May 22, 2026 at 11:45 am

    The reason is that Initialize takes a capital I in nlme so it is not confused with initialize in base. And then there is Vivi’s comment on spatdat$y

    This works:

    > library(nlme)
    > spatDat <- data.frame(x = c(0,0.25,0.5,0.75,1), y = c(0,0.25,0.50,0.75,1.0))
    > cs1Exp <- corExp( 1, form = ~x+y )
    > cs1Exp <- Initialize( cs1Exp, spatDat )
    > corMatrix( cs1Exp )
              [,1]      [,2]      [,3]      [,4]      [,5]
    [1,] 1.0000000 0.7021885 0.4930687 0.3462272 0.2431167
    [2,] 0.7021885 1.0000000 0.7021885 0.4930687 0.3462272
    [3,] 0.4930687 0.7021885 1.0000000 0.7021885 0.4930687
    [4,] 0.3462272 0.4930687 0.7021885 1.0000000 0.7021885
    [5,] 0.2431167 0.3462272 0.4930687 0.7021885 1.0000000
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What did I do wrong? Here is an excerpt from my code: public void
Here's an excerpt from java.text.CharacterIterator documentation: This interface defines a protocol for bidirectional iteration
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here's a coding problem for those that like this kind of thing. Let's see
Here's an excerpt from a fairly standard Rails form: <p> <%= f.label :from_station %>
Here's an excerpt from a book I'm reading about application design with MVC: Ideally,
Here's an excerpt from Sun's Java tutorials : A switch works with the byte
So here's an excerpt from one of my classes: [ThreadStatic] readonly static private AccountManager
This is beyond both making sense and my control. That being said here is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.