extracting last 7 characters from string variable

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

extracting last 7 characters from string variable

Paul Mcgeoghan
Hi,

How do I extract last 7 characters from a string variable?

Thanks,
Paul

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: extracting last 7 characters from string variable

Adam-237
Hi Paul

You can use the SUBSTR(strexpr,pos,length) command from the COMPUTE options. That should be able to do the trick.

Regards
Adam

2009/5/18 Paul McGeoghan <[hidden email]>
Hi,

How do I extract last 7 characters from a string variable?

Thanks,
Paul

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD



--
Cell: +27 84 777 1801
Website: http://www.sigmasurveys.co.za
Blog: http://www.sigmasurveys.co.za/resources
Reply | Threaded
Open this post in threaded view
|

Re: extracting last 7 characters from string variable

Oliver, Richard

Yes, but you need to know what value to use for pos. Assuming the actual string length (not including trailing blanks varies) varies, then the value of pos also varies.

 

There may be simpler or more elegant solutions, but here’s one:

 

data list free /stringvar (a10).

begin data

123

1234

123456

12345678

123456789

1234567890

end data.

string newstring (a7).

compute #len=char.length(stringvar).

compute #pos=#len-7.

if #pos <=0 newstring=stringvar.

if #pos >0 newstring=substr(stringvar,#pos).

list.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Adam
Sent: Monday, May 18, 2009 11:33 AM
To: [hidden email]
Subject: Re: extracting last 7 characters from string variable

 

Hi Paul

You can use the SUBSTR(strexpr,pos,length) command from the COMPUTE options. That should be able to do the trick.

Regards
Adam

2009/5/18 Paul McGeoghan <[hidden email]>

Hi,

How do I extract last 7 characters from a string variable?

Thanks,
Paul

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD




--
Cell: +27 84 777 1801
Website: http://www.sigmasurveys.co.za
Blog: http://www.sigmasurveys.co.za/resources

Reply | Threaded
Open this post in threaded view
|

warning with reliability analysis

Zdaniuk, Bozena-2

Hello, does someone know what the following warning means when running scale reliability analysis?

Thanks a lot.

Bozena

 

Warning: The determinant of the covariance matrix is zero or approximately zero. Statistics based on its inverse matrix cannot be computed and they are displayed as system missing values.

 

Bozena Zdaniuk, Ph.D.

University of Pittsburgh

UCSUR, 6th Fl.

121 University Place

Pittsburgh, PA 15260

Ph.: 412-624-5736

Fax: 412-624-4810

Email: [hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: warning with reliability analysis

Art Kendall
It means some item(s) is (are) fully predictable from some other item(s).
first check that you have not included items more than once on the same scale.
Then look at the corrected item-total correlations for very high values.  If it provided the squared multiple correlations look at those also.

Art Kendall
Social Research Consultants



Zdaniuk, Bozena wrote:

Hello, does someone know what the following warning means when running scale reliability analysis?

Thanks a lot.

Bozena

 

Warning: The determinant of the covariance matrix is zero or approximately zero. Statistics based on its inverse matrix cannot be computed and they are displayed as system missing values.

 

Bozena Zdaniuk, Ph.D.

University of Pittsburgh

UCSUR, 6th Fl.

121 University Place

Pittsburgh, PA 15260

Ph.: 412-624-5736

Fax: 412-624-4810

Email: [hidden email]

 

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: warning with reliability analysis

Zdaniuk, Bozena-2

Thanks a lot, Art. I had two items correlating at .80. When I removed them the warning disappeared!

Bozena

 

Bozena Zdaniuk, Ph.D.

University of Pittsburgh

UCSUR, 6th Fl.

121 University Place

Pittsburgh, PA 15260

Ph.: 412-624-5736

Fax: 412-624-4810

Email: [hidden email]

 

From: Art Kendall [mailto:[hidden email]]
Sent: Monday, May 18, 2009 2:19 PM
To: Zdaniuk, Bozena
Cc: [hidden email]
Subject: Re: warning with reliability analysis

 

It means some item(s) is (are) fully predictable from some other item(s).
first check that you have not included items more than once on the same scale.
Then look at the corrected item-total correlations for very high values.  If it provided the squared multiple correlations look at those also.

Art Kendall
Social Research Consultants



Zdaniuk, Bozena wrote:

Hello, does someone know what the following warning means when running scale reliability analysis?

Thanks a lot.

Bozena

 

Warning: The determinant of the covariance matrix is zero or approximately zero. Statistics based on its inverse matrix cannot be computed and they are displayed as system missing values.

 

Bozena Zdaniuk, Ph.D.

University of Pittsburgh

UCSUR, 6th Fl.

121 University Place

Pittsburgh, PA 15260

Ph.: 412-624-5736

Fax: 412-624-4810

Email: [hidden email]

 

Reply | Threaded
Open this post in threaded view
|

panel data analytic techniques

mpirritano
In reply to this post by Adam-237

Hello pasw’ers,

 

I have panel data. Individuals receive an intervention, but they all receive it at different times. What data analytic technique can be used with this type of data? I asked a similar question some time ago and was told that this is a panel data analysis, but I’ve not found much on what exactly that type of analysis is. I have come across some references to the generalized linear model. Any basic primers, preferably journal articles, that anyone could point me to?

 

Thanks in advance,

Matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648

Reply | Threaded
Open this post in threaded view
|

Re: panel data analytic techniques

Tore Viland
Hi Matthew,
 
See for instance "Hanbook of data analysis. Ed. Melissa Hardy and Alan Bryman (2004), part 3: Longitudinal Models. I find Petersen, 2004 in particularly useful there. Also Hsiao, 2003 is ecxellent in elaborating on such models.
 

Hsiao, C. (2003),

Analysis of Panel Data, 2nd edition, New York: Cambridge UniversityPress

Petersen, Trond (2004a): “Analyzing Panel Data: Fixed– and Random–Effects Models.”Chapter 15 (pp. 331–345) in Alan Bryman and Melissa Hardy (Eds.),

Handbook of Data Analysis. London: Sage Publications Inc
 
 
Regards,
 
Tore

On Tue, May 19, 2009 at 1:05 AM, Pirritano, Matthew <[hidden email]> wrote:

Hello pasw’ers,

 

I have panel data. Individuals receive an intervention, but they all receive it at different times. What data analytic technique can be used with this type of data? I asked a similar question some time ago and was told that this is a panel data analysis, but I’ve not found much on what exactly that type of analysis is. I have come across some references to the generalized linear model. Any basic primers, preferably journal articles, that anyone could point me to?

 

Thanks in advance,

Matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648


Reply | Threaded
Open this post in threaded view
|

Re: panel data analytic techniques

Arthur Burke
In reply to this post by mpirritano
The text by Singer and Willett might help you ...

http://gseacademic.harvard.edu/alda/

Art
------------------------------------------------------------------

Art Burke
Northwest Regional Educational Laboratory
101 SW Main St, Suite 500
Portland, OR 97204-3213

Phone:  503-275-9592 / 800-547-6339

Fax: 503-275-0450

[hidden email]

________________________________

From: Pirritano, Matthew [mailto:[hidden email]]
Sent: Monday, May 18, 2009 4:06 PM
To: [hidden email]
Subject: panel data analytic techniques



Hello pasw'ers,



I have panel data. Individuals receive an intervention, but they all
receive it at different times. What data analytic technique can be used
with this type of data? I asked a similar question some time ago and was
told that this is a panel data analysis, but I've not found much on what
exactly that type of analysis is. I have come across some references to
the generalized linear model. Any basic primers, preferably journal
articles, that anyone could point me to?



Thanks in advance,

Matt



Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD