[R] SEM GFI
VINAY KULKARNI
vinaypkulkarni at yahoo.com
Wed Jun 1 19:41:59 CEST 2016
Hi,
Please find below the code:
Thanks,Vinay
>library(sem) >data1=read.csv("data_1.csv") >corr=cor(data1) model1<-specifyModel()brand1_Pric_ind -> Val_brand1,lamb1,NADist_brand1 -> Val_brand1,lamb2,NAbrand1_like_me -> Val_brand1,lamb3,NAbrand2_Def_Drink -> Val_brand1,lamb4,NAbrand2_Like -> brand2_Def_Drink,lamb5,NAbrand2_Pleasure -> brand2_Def_Drink,lamb6,NAbrand1_Like -> brand1_like_me,lamb7,NAbrand1_Love -> brand1_like_me,lamb8,NAbrand1_P4WC -> brand1_Like,lamb9,NAbrand1_P4WC -> brand1_Love,lamb10,NAbrand1_Energy -> brand1_P4WC,lamb11,NAbrand1_Different -> brand1_P4WC,lamb12,NAbrand1_Pric_ind <-> brand1_Pric_ind,the1,NADist_brand1 <-> Dist_brand1,the2,NAbrand1_like_me <-> brand1_like_me,the3,NAbrand2_Def_Drink <-> brand2_Def_Drink,the4,NAbrand2_Like <-> brand2_Like,the5,NAbrand2_Pleasure <-> brand2_Pleasure,the6,NAbrand1_Like <-> brand1_Like,the7,NAbrand1_Love <-> brand1_Love,the8,NAbrand1_P4WC <-> brand1_P4WC,the9,NAbrand1_Energy <-> brand1_Energy,the10,NAbrand1_Different <-> brand1_Different,the11,NAbrand1_like_me <-> brand2_Def_Drink,the12,NAbrand1_Like <-> brand1_Love,the13,NAVal_brand1 <-> Val_brand1,1,NA > opt <- options(fit.indices = c("GFI", "AGFI", "RMSEA", "NFI", "NNFI", "CFI", "RNI", "IFI", "SRMR", "AIC", "AICc", "BIC", "CAIC")) > sem.model1<-sem(model1,corr,36)
> summary(sem.model1)
From: Bert Gunter <bgunter.4567 at gmail.com>
To: VINAY KULKARNI <vinaypkulkarni at yahoo.com>
Cc: "r-help at r-project.org" <r-help at r-project.org>
Sent: Wednesday, 1 June 2016 2:16 AM
Subject: Re: [R] SEM GFI
Probably impossible to answer without your following the posting guide
and posting your code, etc.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, May 31, 2016 at 11:28 AM, VINAY KULKARNI via R-help
<r-help at r-project.org> wrote:
> Hi,
> I am exactly replicating the SEM model which was done in SAS using Proc Calis in R.
> Used sem package in R but not getting the GFI as same as in SAS (approximately 15% difference)
> and also one link is insignificant but in SAS am getting significant.
> Searched through online in different blogs but not able to get the solution.
> Please let me know what might be the reason.
> Thanks,Vinay
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help
mailing list