0

for my fungal radial growth, I used linear mixed model and I want to assign a column for predicted Blue values but I have an error which mention

<error/tibble_error_assign_incompatible_size> Assigned data `value` must be compatible with existing data. x Existing data has 270 rows. x Assigned data has 264 rows. ℹ Only vectors of size 1 are recycled.

These are my codes

# Xb
Fix.BLUEs_Fungal_growth <- getME(Fungal_growth_LmerTest,'X') %*% fixef(Fungal_growth_LmerTest)
Fix.BLUEs_Fungal_growth
# Zu
Ran.BLUPs_Fungal_growth <- t(as.matrix(getME(Fungal_growth_LmerTest,'Zt'))) %*% unlist(ranef(Fungal_growth_LmerTest))
Ran.BLUPs_Fungal_growth
# Xb + Zu

Predict_BLUEs_Fungal_growth<- Fix.BLUEs_Fungal_growth
Predict_BLUEs_Fungal_growth


All_rep$Predicted_fungal_Growth<- Predict_BLUEs_Fungal_growth

how can i solve this problem?

  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jul 31 '20 at 23:22
  • Actually I had some missing valus in my dataset and when I used Lmer, this automatically eliminates all the missing valus and then comput the result, the problem was that i wanted to make a column for Calculated valus. but when i understood that lmer, omit the missing data, first I imputed the missing valus ( with estim_ncpPCA() and imputePCA()) then I calculated BLUEs and then designated a column to calculated valus – Amirfartash Aug 03 '20 at 10:42

0 Answers0