BookmarkSubscribe
Choose Language Hide Translation Bar
Mickyboy
Community Trekker

Fit y by X scripting

I have a data table consisting of six variables and 2000 subjects, I can manually do the analysis I want which is to fit y by x with y = mcg/mL, x = Time point and I want it by subtype, I then want to group it by Lot Number, and fit special – I want a natural log transformation of y and not centred and I get this along with a report
which is perfect and exactly what I want, however, I would like to automate the process when I do this maually then use “current data table() get script;  and modify the syntax I get Bivariate(SendToByGroup({:Subtype }), Y(:Name("HA mcg/mL")),
X(:Time point), Fit Where(:Lot Number, Fit Special(yTran("Log"),
Centered Polynomial(0)))); however the by subtype is not working, group by lot number and the transformation isn’t working, can anyone provide any advice??

Many thanks

 

Mickyboy

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
gzmorgan0
Super User

Re: Fit y by X scripting

Try this

biv = Bivariate(
	Y( :Name( "HA mcg/mL" ) ),
	X( :Time point ),
	By( :Subtype ),
	Group By( :Lot Number ),
	Fit Special( yTran( "Log" ), Centered Polynomial( 0 ) )
); 

2 REPLIES 2
Highlighted
gzmorgan0
Super User

Re: Fit y by X scripting

Try this

biv = Bivariate(
	Y( :Name( "HA mcg/mL" ) ),
	X( :Time point ),
	By( :Subtype ),
	Group By( :Lot Number ),
	Fit Special( yTran( "Log" ), Centered Polynomial( 0 ) )
); 

Mickyboy
Community Trekker

Re: Fit y by X scripting

Hi Gzmorgan0,

 

Did the job perfectly, thanks so muck for your help.

 

Regards

Mickyboy

0 Kudos