Dear Posit Community members,
I think I am running into a list formulation issue for which I can't figure out the solutions despite all my efforts.
I have a dataset containing 75 variables. I want to create two equations using the operator "." to save the typing for all variables. However, the code can run no problem when I only use a few specific column names to build the equation, but won't recognize variables when I add the "." operator.
My code is as follows:
S7: define equations
#library(dplyr)
#library(tidyr)
#DAM <- cbind(D1[,2],D1[,5:72])
#DPM <- cbind(D1[,4:72])
AM <- Avg_Speed_AMPK_sqrt__Y__ ~ -.(3,4)
PM <- Avg_Speed_PMPK_log__Y__ ~ -.(1,2)
sure_list <- list(AM=AM,PM=PM)
S8: SURE model
library(systemfit)
sur <- systemfit(sure_list,method="SUR",data=D1)
summary(sur)
Anyone can help troubleshooting this issue I encountered?